//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension LexModelBuildingService {
    // MARK: Enums

    public enum ChannelStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case created = "CREATED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum ChannelType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case facebook = "Facebook"
        case kik = "Kik"
        case slack = "Slack"
        case twilioSms = "Twilio-Sms"
        public var description: String { return self.rawValue }
    }

    public enum ContentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case customPayload = "CustomPayload"
        case plainText = "PlainText"
        case ssml = "SSML"
        public var description: String { return self.rawValue }
    }

    public enum Destination: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cloudwatchLogs = "CLOUDWATCH_LOGS"
        case s3 = "S3"
        public var description: String { return self.rawValue }
    }

    public enum ExportStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case ready = "READY"
        public var description: String { return self.rawValue }
    }

    public enum ExportType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case alexaSkillsKit = "ALEXA_SKILLS_KIT"
        case lex = "LEX"
        public var description: String { return self.rawValue }
    }

    public enum FulfillmentActivityType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case codeHook = "CodeHook"
        case returnIntent = "ReturnIntent"
        public var description: String { return self.rawValue }
    }

    public enum ImportStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case complete = "COMPLETE"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum Locale: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deDe = "de-DE"
        case enAu = "en-AU"
        case enGb = "en-GB"
        case enIn = "en-IN"
        case enUs = "en-US"
        case es419 = "es-419"
        case esEs = "es-ES"
        case esUs = "es-US"
        case frCa = "fr-CA"
        case frFr = "fr-FR"
        case itIt = "it-IT"
        case jaJp = "ja-JP"
        case koKr = "ko-KR"
        public var description: String { return self.rawValue }
    }

    public enum LogType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case audio = "AUDIO"
        case text = "TEXT"
        public var description: String { return self.rawValue }
    }

    public enum MergeStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failOnConflict = "FAIL_ON_CONFLICT"
        case overwriteLatest = "OVERWRITE_LATEST"
        public var description: String { return self.rawValue }
    }

    public enum MigrationAlertType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case error = "ERROR"
        case warn = "WARN"
        public var description: String { return self.rawValue }
    }

    public enum MigrationSortAttribute: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case migrationDateTime = "MIGRATION_DATE_TIME"
        case v1BotName = "V1_BOT_NAME"
        public var description: String { return self.rawValue }
    }

    public enum MigrationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum MigrationStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case createNew = "CREATE_NEW"
        case updateExisting = "UPDATE_EXISTING"
        public var description: String { return self.rawValue }
    }

    public enum ObfuscationSetting: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case defaultObfuscation = "DEFAULT_OBFUSCATION"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum ProcessBehavior: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case build = "BUILD"
        case save = "SAVE"
        public var description: String { return self.rawValue }
    }

    public enum ReferenceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bot = "Bot"
        case botalias = "BotAlias"
        case botchannel = "BotChannel"
        case intent = "Intent"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bot = "BOT"
        case intent = "INTENT"
        case slotType = "SLOT_TYPE"
        public var description: String { return self.rawValue }
    }

    public enum SlotConstraint: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case optional = "Optional"
        case required = "Required"
        public var description: String { return self.rawValue }
    }

    public enum SlotValueSelectionStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case originalValue = "ORIGINAL_VALUE"
        case topResolution = "TOP_RESOLUTION"
        public var description: String { return self.rawValue }
    }

    public enum SortOrder: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ascending = "ASCENDING"
        case descending = "DESCENDING"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case building = "BUILDING"
        case failed = "FAILED"
        case notBuilt = "NOT_BUILT"
        case ready = "READY"
        case readyBasicTesting = "READY_BASIC_TESTING"
        public var description: String { return self.rawValue }
    }

    public enum StatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case detected = "Detected"
        case missed = "Missed"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct BotAliasMetadata: AWSDecodableShape {
        /// The name of the bot to which the alias points.
        public let botName: String?
        /// The version of the Amazon Lex bot to which the alias points.
        public let botVersion: String?
        /// Checksum of the bot alias.
        public let checksum: String?
        /// Settings that determine how Amazon Lex uses conversation logs for the alias.
        public let conversationLogs: ConversationLogsResponse?
        /// The date that the bot alias was created.
        public let createdDate: Date?
        /// A description of the bot alias.
        public let description: String?
        /// The date that the bot alias was updated. When you create a resource, the creation date and last updated date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the bot alias.
        public let name: String?

        @inlinable
        public init(botName: String? = nil, botVersion: String? = nil, checksum: String? = nil, conversationLogs: ConversationLogsResponse? = nil, createdDate: Date? = nil, description: String? = nil, lastUpdatedDate: Date? = nil, name: String? = nil) {
            self.botName = botName
            self.botVersion = botVersion
            self.checksum = checksum
            self.conversationLogs = conversationLogs
            self.createdDate = createdDate
            self.description = description
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case botName = "botName"
            case botVersion = "botVersion"
            case checksum = "checksum"
            case conversationLogs = "conversationLogs"
            case createdDate = "createdDate"
            case description = "description"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
        }
    }

    public struct BotChannelAssociation: AWSDecodableShape {
        /// An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.
        public let botAlias: String?
        /// Provides information necessary to communicate with the messaging platform.
        public let botConfiguration: [String: String]?
        /// The name of the Amazon Lex bot to which this association is being made.   Currently, Amazon Lex supports associations with Facebook and Slack, and Twilio.
        public let botName: String?
        /// The date that the association between the Amazon Lex bot and the channel was created.
        public let createdDate: Date?
        /// A text description of the association you are creating.
        public let description: String?
        /// If status is FAILED, Amazon Lex provides the reason that it failed to create the association.
        public let failureReason: String?
        /// The name of the association between the bot and the channel.
        public let name: String?
        /// The status of the bot channel.     CREATED - The channel has been created and is ready for use.    IN_PROGRESS - Channel creation is in progress.    FAILED - There was an error creating the channel. For information about the reason for the failure, see the failureReason field.
        public let status: ChannelStatus?
        /// Specifies the type of association by indicating the type of channel being established between the Amazon Lex bot and the external messaging platform.
        public let type: ChannelType?

        @inlinable
        public init(botAlias: String? = nil, botConfiguration: [String: String]? = nil, botName: String? = nil, createdDate: Date? = nil, description: String? = nil, failureReason: String? = nil, name: String? = nil, status: ChannelStatus? = nil, type: ChannelType? = nil) {
            self.botAlias = botAlias
            self.botConfiguration = botConfiguration
            self.botName = botName
            self.createdDate = createdDate
            self.description = description
            self.failureReason = failureReason
            self.name = name
            self.status = status
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case botAlias = "botAlias"
            case botConfiguration = "botConfiguration"
            case botName = "botName"
            case createdDate = "createdDate"
            case description = "description"
            case failureReason = "failureReason"
            case name = "name"
            case status = "status"
            case type = "type"
        }
    }

    public struct BotMetadata: AWSDecodableShape {
        /// The date that the bot was created.
        public let createdDate: Date?
        /// A description of the bot.
        public let description: String?
        /// The date that the bot was updated. When you create a bot, the creation date and last updated date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the bot.
        public let name: String?
        /// The status of the bot.
        public let status: Status?
        /// The version of the bot. For a new bot, the version is always $LATEST.
        public let version: String?

        @inlinable
        public init(createdDate: Date? = nil, description: String? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, status: Status? = nil, version: String? = nil) {
            self.createdDate = createdDate
            self.description = description
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.status = status
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "createdDate"
            case description = "description"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case status = "status"
            case version = "version"
        }
    }

    public struct BuiltinIntentMetadata: AWSDecodableShape {
        /// A unique identifier for the built-in intent. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
        public let signature: String?
        /// A list of identifiers for the locales that the intent supports.
        public let supportedLocales: [Locale]?

        @inlinable
        public init(signature: String? = nil, supportedLocales: [Locale]? = nil) {
            self.signature = signature
            self.supportedLocales = supportedLocales
        }

        private enum CodingKeys: String, CodingKey {
            case signature = "signature"
            case supportedLocales = "supportedLocales"
        }
    }

    public struct BuiltinIntentSlot: AWSDecodableShape {
        /// A list of the slots defined for the intent.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct BuiltinSlotTypeMetadata: AWSDecodableShape {
        /// A unique identifier for the built-in slot type. To find the signature for a slot type, see Slot Type Reference in the Alexa Skills Kit.
        public let signature: String?
        /// A list of target locales for the slot.
        public let supportedLocales: [Locale]?

        @inlinable
        public init(signature: String? = nil, supportedLocales: [Locale]? = nil) {
            self.signature = signature
            self.supportedLocales = supportedLocales
        }

        private enum CodingKeys: String, CodingKey {
            case signature = "signature"
            case supportedLocales = "supportedLocales"
        }
    }

    public struct CodeHook: AWSEncodableShape & AWSDecodableShape {
        /// The version of the request-response that you want Amazon Lex to use to invoke your Lambda function. For more information, see using-lambda.
        public let messageVersion: String
        /// The Amazon Resource Name (ARN) of the Lambda function.
        public let uri: String

        @inlinable
        public init(messageVersion: String, uri: String) {
            self.messageVersion = messageVersion
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.messageVersion, name: "messageVersion", parent: name, max: 5)
            try self.validate(self.messageVersion, name: "messageVersion", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, max: 2048)
            try self.validate(self.uri, name: "uri", parent: name, min: 20)
            try self.validate(self.uri, name: "uri", parent: name, pattern: "^arn:aws[a-zA-Z-]*:lambda:[a-z]+-[a-z]+(-[a-z]+)*-[0-9]:[0-9]{12}:function:[a-zA-Z0-9-_]+(\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case messageVersion = "messageVersion"
            case uri = "uri"
        }
    }

    public struct ConversationLogsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of an IAM role with permission to write to your CloudWatch Logs for text logs and your S3 bucket for audio logs. If audio encryption is enabled, this role also provides access permission for the AWS KMS key used for encrypting audio logs. For more information, see Creating an IAM Role and Policy for Conversation Logs.
        public let iamRoleArn: String
        /// The settings for your conversation logs. You can log the conversation text, conversation audio, or both.
        public let logSettings: [LogSettingsRequest]

        @inlinable
        public init(iamRoleArn: String, logSettings: [LogSettingsRequest]) {
            self.iamRoleArn = iamRoleArn
            self.logSettings = logSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 2048)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 20)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, pattern: "^arn:[\\w\\-]+:iam::[\\d]{12}:role/.+$")
            try self.logSettings.forEach {
                try $0.validate(name: "\(name).logSettings[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case iamRoleArn = "iamRoleArn"
            case logSettings = "logSettings"
        }
    }

    public struct ConversationLogsResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the IAM role used to write your logs to CloudWatch Logs or an S3 bucket.
        public let iamRoleArn: String?
        /// The settings for your conversation logs. You can log text, audio, or both.
        public let logSettings: [LogSettingsResponse]?

        @inlinable
        public init(iamRoleArn: String? = nil, logSettings: [LogSettingsResponse]? = nil) {
            self.iamRoleArn = iamRoleArn
            self.logSettings = logSettings
        }

        private enum CodingKeys: String, CodingKey {
            case iamRoleArn = "iamRoleArn"
            case logSettings = "logSettings"
        }
    }

    public struct CreateBotVersionRequest: AWSEncodableShape {
        /// Identifies a specific revision of the $LATEST version of the bot. If you specify a checksum and the $LATEST version of the bot has a different checksum, a PreconditionFailedException exception is returned and Amazon Lex doesn't publish a new version. If you don't specify a checksum, Amazon Lex publishes the $LATEST version.
        public let checksum: String?
        /// The name of the bot that you want to create a new version of. The name is case sensitive.
        public let name: String

        @inlinable
        public init(checksum: String? = nil, name: String) {
            self.checksum = checksum
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.checksum, forKey: .checksum)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
        }
    }

    public struct CreateBotVersionResponse: AWSDecodableShape {
        /// The message that Amazon Lex uses to cancel a conversation. For more information, see PutBot.
        public let abortStatement: Statement?
        /// Checksum identifying the version of the bot that was created.
        public let checksum: String?
        /// For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.
        public let childDirected: Bool?
        /// The message that Amazon Lex uses when it doesn't understand the user's request. For more information, see PutBot.
        public let clarificationPrompt: Prompt?
        /// The date when the bot version was created.
        public let createdDate: Date?
        /// A description of the bot.
        public let description: String?
        /// Indicates whether utterances entered by the user should be sent to Amazon Comprehend for sentiment analysis.
        public let detectSentiment: Bool?
        /// Indicates whether the bot uses accuracy improvements. true indicates that the bot is using the improvements, otherwise, false.
        public let enableModelImprovements: Bool?
        /// If status is FAILED, Amazon Lex provides the reason that it failed to build the bot.
        public let failureReason: String?
        /// The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. For more information, see PutBot.
        public let idleSessionTTLInSeconds: Int?
        /// An array of Intent objects. For more information, see PutBot.
        public let intents: [Intent]?
        /// The date when the $LATEST version of this bot was updated.
        public let lastUpdatedDate: Date?
        ///  Specifies the target locale for the bot.
        public let locale: Locale?
        /// The name of the bot.
        public let name: String?
        ///  When you send a request to create or update a bot, Amazon Lex sets the status response element to BUILDING. After Amazon Lex builds the bot, it sets status to READY. If Amazon Lex can't build the bot, it sets status to FAILED. Amazon Lex returns the reason for the failure in the failureReason response element.
        public let status: Status?
        /// The version of the bot.
        public let version: String?
        /// The Amazon Polly voice ID that Amazon Lex uses for voice interactions with the user.
        public let voiceId: String?

        @inlinable
        public init(abortStatement: Statement? = nil, checksum: String? = nil, childDirected: Bool? = nil, clarificationPrompt: Prompt? = nil, createdDate: Date? = nil, description: String? = nil, detectSentiment: Bool? = nil, enableModelImprovements: Bool? = nil, failureReason: String? = nil, idleSessionTTLInSeconds: Int? = nil, intents: [Intent]? = nil, lastUpdatedDate: Date? = nil, locale: Locale? = nil, name: String? = nil, status: Status? = nil, version: String? = nil, voiceId: String? = nil) {
            self.abortStatement = abortStatement
            self.checksum = checksum
            self.childDirected = childDirected
            self.clarificationPrompt = clarificationPrompt
            self.createdDate = createdDate
            self.description = description
            self.detectSentiment = detectSentiment
            self.enableModelImprovements = enableModelImprovements
            self.failureReason = failureReason
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.intents = intents
            self.lastUpdatedDate = lastUpdatedDate
            self.locale = locale
            self.name = name
            self.status = status
            self.version = version
            self.voiceId = voiceId
        }

        private enum CodingKeys: String, CodingKey {
            case abortStatement = "abortStatement"
            case checksum = "checksum"
            case childDirected = "childDirected"
            case clarificationPrompt = "clarificationPrompt"
            case createdDate = "createdDate"
            case description = "description"
            case detectSentiment = "detectSentiment"
            case enableModelImprovements = "enableModelImprovements"
            case failureReason = "failureReason"
            case idleSessionTTLInSeconds = "idleSessionTTLInSeconds"
            case intents = "intents"
            case lastUpdatedDate = "lastUpdatedDate"
            case locale = "locale"
            case name = "name"
            case status = "status"
            case version = "version"
            case voiceId = "voiceId"
        }
    }

    public struct CreateIntentVersionRequest: AWSEncodableShape {
        /// Checksum of the $LATEST version of the intent that should be used to create the new version. If you specify a checksum and the $LATEST version of the intent has a different checksum, Amazon Lex returns a PreconditionFailedException exception and doesn't publish a new version. If you don't specify a checksum, Amazon Lex publishes the $LATEST version.
        public let checksum: String?
        /// The name of the intent that you want to create a new version of. The name is case sensitive.
        public let name: String

        @inlinable
        public init(checksum: String? = nil, name: String) {
            self.checksum = checksum
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.checksum, forKey: .checksum)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
        }
    }

    public struct CreateIntentVersionResponse: AWSDecodableShape {
        /// Checksum of the intent version created.
        public let checksum: String?
        /// After the Lambda function specified in the fulfillmentActivity field fulfills the intent, Amazon Lex conveys this statement to the user.
        public let conclusionStatement: Statement?
        /// If defined, the prompt that Amazon Lex uses to confirm the user's intent before fulfilling it.
        public let confirmationPrompt: Prompt?
        /// The date that the intent was created.
        public let createdDate: Date?
        /// A description of the intent.
        public let description: String?
        /// If defined, Amazon Lex invokes this Lambda function for each user input.
        public let dialogCodeHook: CodeHook?
        /// If defined, Amazon Lex uses this prompt to solicit additional user activity after the intent is fulfilled.
        public let followUpPrompt: FollowUpPrompt?
        ///  Describes how the intent is fulfilled.
        public let fulfillmentActivity: FulfillmentActivity?
        /// An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
        public let inputContexts: [InputContext]?
        /// Configuration information, if any, for connecting an Amazon Kendra index with the AMAZON.KendraSearchIntent intent.
        public let kendraConfiguration: KendraConfiguration?
        /// The date that the intent was updated.
        public let lastUpdatedDate: Date?
        /// The name of the intent.
        public let name: String?
        /// An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// A unique identifier for a built-in intent.
        public let parentIntentSignature: String?
        /// If the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
        public let rejectionStatement: Statement?
        /// An array of sample utterances configured for the intent.
        public let sampleUtterances: [String]?
        /// An array of slot types that defines the information required to fulfill the intent.
        public let slots: [Slot]?
        /// The version number assigned to the new version of the intent.
        public let version: String?

        @inlinable
        public init(checksum: String? = nil, conclusionStatement: Statement? = nil, confirmationPrompt: Prompt? = nil, createdDate: Date? = nil, description: String? = nil, dialogCodeHook: CodeHook? = nil, followUpPrompt: FollowUpPrompt? = nil, fulfillmentActivity: FulfillmentActivity? = nil, inputContexts: [InputContext]? = nil, kendraConfiguration: KendraConfiguration? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, rejectionStatement: Statement? = nil, sampleUtterances: [String]? = nil, slots: [Slot]? = nil, version: String? = nil) {
            self.checksum = checksum
            self.conclusionStatement = conclusionStatement
            self.confirmationPrompt = confirmationPrompt
            self.createdDate = createdDate
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.followUpPrompt = followUpPrompt
            self.fulfillmentActivity = fulfillmentActivity
            self.inputContexts = inputContexts
            self.kendraConfiguration = kendraConfiguration
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.rejectionStatement = rejectionStatement
            self.sampleUtterances = sampleUtterances
            self.slots = slots
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case conclusionStatement = "conclusionStatement"
            case confirmationPrompt = "confirmationPrompt"
            case createdDate = "createdDate"
            case description = "description"
            case dialogCodeHook = "dialogCodeHook"
            case followUpPrompt = "followUpPrompt"
            case fulfillmentActivity = "fulfillmentActivity"
            case inputContexts = "inputContexts"
            case kendraConfiguration = "kendraConfiguration"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case outputContexts = "outputContexts"
            case parentIntentSignature = "parentIntentSignature"
            case rejectionStatement = "rejectionStatement"
            case sampleUtterances = "sampleUtterances"
            case slots = "slots"
            case version = "version"
        }
    }

    public struct CreateSlotTypeVersionRequest: AWSEncodableShape {
        /// Checksum for the $LATEST version of the slot type that you want to publish. If you specify a checksum and the $LATEST version of the slot type has a different checksum, Amazon Lex returns a PreconditionFailedException exception and doesn't publish the new version. If you don't specify a checksum, Amazon Lex publishes the $LATEST version.
        public let checksum: String?
        /// The name of the slot type that you want to create a new version for. The name is case sensitive.
        public let name: String

        @inlinable
        public init(checksum: String? = nil, name: String) {
            self.checksum = checksum
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.checksum, forKey: .checksum)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
        }
    }

    public struct CreateSlotTypeVersionResponse: AWSDecodableShape {
        /// Checksum of the $LATEST version of the slot type.
        public let checksum: String?
        /// The date that the slot type was created.
        public let createdDate: Date?
        /// A description of the slot type.
        public let description: String?
        /// A list of EnumerationValue objects that defines the values that the slot type can take.
        public let enumerationValues: [EnumerationValue]?
        /// The date that the slot type was updated. When you create a resource, the creation date and last update date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the slot type.
        public let name: String?
        /// The built-in slot type used a the parent of the slot type.
        public let parentSlotTypeSignature: String?
        /// Configuration information that extends the parent built-in slot type.
        public let slotTypeConfigurations: [SlotTypeConfiguration]?
        /// The strategy that Amazon Lex uses to determine the value of the slot. For more information, see PutSlotType.
        public let valueSelectionStrategy: SlotValueSelectionStrategy?
        /// The version assigned to the new slot type version.
        public let version: String?

        @inlinable
        public init(checksum: String? = nil, createdDate: Date? = nil, description: String? = nil, enumerationValues: [EnumerationValue]? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, parentSlotTypeSignature: String? = nil, slotTypeConfigurations: [SlotTypeConfiguration]? = nil, valueSelectionStrategy: SlotValueSelectionStrategy? = nil, version: String? = nil) {
            self.checksum = checksum
            self.createdDate = createdDate
            self.description = description
            self.enumerationValues = enumerationValues
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeConfigurations = slotTypeConfigurations
            self.valueSelectionStrategy = valueSelectionStrategy
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case createdDate = "createdDate"
            case description = "description"
            case enumerationValues = "enumerationValues"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case parentSlotTypeSignature = "parentSlotTypeSignature"
            case slotTypeConfigurations = "slotTypeConfigurations"
            case valueSelectionStrategy = "valueSelectionStrategy"
            case version = "version"
        }
    }

    public struct DeleteBotAliasRequest: AWSEncodableShape {
        /// The name of the bot that the alias points to.
        public let botName: String
        /// The name of the alias to delete. The name is case sensitive.
        public let name: String

        @inlinable
        public init(botName: String, name: String) {
            self.botName = botName
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botName, key: "botName")
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBotChannelAssociationRequest: AWSEncodableShape {
        /// An alias that points to the specific version of the Amazon Lex bot to which this association is being made.
        public let botAlias: String
        /// The name of the Amazon Lex bot.
        public let botName: String
        /// The name of the association. The name is case sensitive.
        public let name: String

        @inlinable
        public init(botAlias: String, botName: String, name: String) {
            self.botAlias = botAlias
            self.botName = botName
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botAlias, key: "botAlias")
            request.encodePath(self.botName, key: "botName")
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.botAlias, name: "botAlias", parent: name, max: 100)
            try self.validate(self.botAlias, name: "botAlias", parent: name, min: 1)
            try self.validate(self.botAlias, name: "botAlias", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBotRequest: AWSEncodableShape {
        /// The name of the bot. The name is case sensitive.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBotVersionRequest: AWSEncodableShape {
        /// The name of the bot.
        public let name: String
        /// The version of the bot to delete. You cannot delete the $LATEST version of the bot. To delete the $LATEST version, use the DeleteBot operation.
        public let version: String

        @inlinable
        public init(name: String, version: String) {
            self.name = name
            self.version = version
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
            request.encodePath(self.version, key: "version")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.version, name: "version", parent: name, max: 64)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteIntentRequest: AWSEncodableShape {
        /// The name of the intent. The name is case sensitive.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteIntentVersionRequest: AWSEncodableShape {
        /// The name of the intent.
        public let name: String
        /// The version of the intent to delete. You cannot delete the $LATEST version of the intent. To delete the $LATEST version, use the DeleteIntent operation.
        public let version: String

        @inlinable
        public init(name: String, version: String) {
            self.name = name
            self.version = version
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
            request.encodePath(self.version, key: "version")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.version, name: "version", parent: name, max: 64)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSlotTypeRequest: AWSEncodableShape {
        /// The name of the slot type. The name is case sensitive.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSlotTypeVersionRequest: AWSEncodableShape {
        /// The name of the slot type.
        public let name: String
        /// The version of the slot type to delete. You cannot delete the $LATEST version of the slot type. To delete the $LATEST version, use the DeleteSlotType operation.
        public let version: String

        @inlinable
        public init(name: String, version: String) {
            self.name = name
            self.version = version
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
            request.encodePath(self.version, key: "version")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.version, name: "version", parent: name, max: 64)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUtterancesRequest: AWSEncodableShape {
        /// The name of the bot that stored the utterances.
        public let botName: String
        ///  The unique identifier for the user that made the utterances. This is the user ID that was sent in the PostContent or PostText operation request that contained the utterance.
        public let userId: String

        @inlinable
        public init(botName: String, userId: String) {
            self.botName = botName
            self.userId = userId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botName, key: "botName")
            request.encodePath(self.userId, key: "userId")
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.userId, name: "userId", parent: name, max: 100)
            try self.validate(self.userId, name: "userId", parent: name, min: 2)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct EnumerationValue: AWSEncodableShape & AWSDecodableShape {
        /// Additional values related to the slot type value.
        public let synonyms: [String]?
        /// The value of the slot type.
        public let value: String

        @inlinable
        public init(synonyms: [String]? = nil, value: String) {
            self.synonyms = synonyms
            self.value = value
        }

        public func validate(name: String) throws {
            try self.synonyms?.forEach {
                try validate($0, name: "synonyms[]", parent: name, max: 140)
                try validate($0, name: "synonyms[]", parent: name, min: 1)
            }
            try self.validate(self.value, name: "value", parent: name, max: 140)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case synonyms = "synonyms"
            case value = "value"
        }
    }

    public struct FollowUpPrompt: AWSEncodableShape & AWSDecodableShape {
        /// Prompts for information from the user.
        public let prompt: Prompt
        /// If the user answers "no" to the question defined in the prompt field, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
        public let rejectionStatement: Statement

        @inlinable
        public init(prompt: Prompt, rejectionStatement: Statement) {
            self.prompt = prompt
            self.rejectionStatement = rejectionStatement
        }

        public func validate(name: String) throws {
            try self.prompt.validate(name: "\(name).prompt")
            try self.rejectionStatement.validate(name: "\(name).rejectionStatement")
        }

        private enum CodingKeys: String, CodingKey {
            case prompt = "prompt"
            case rejectionStatement = "rejectionStatement"
        }
    }

    public struct FulfillmentActivity: AWSEncodableShape & AWSDecodableShape {
        ///  A description of the Lambda function that is run to fulfill the intent.
        public let codeHook: CodeHook?
        ///  How the intent should be fulfilled, either by running a Lambda function or by returning the slot data to the client application.
        public let type: FulfillmentActivityType

        @inlinable
        public init(codeHook: CodeHook? = nil, type: FulfillmentActivityType) {
            self.codeHook = codeHook
            self.type = type
        }

        public func validate(name: String) throws {
            try self.codeHook?.validate(name: "\(name).codeHook")
        }

        private enum CodingKeys: String, CodingKey {
            case codeHook = "codeHook"
            case type = "type"
        }
    }

    public struct GetBotAliasRequest: AWSEncodableShape {
        /// The name of the bot.
        public let botName: String
        /// The name of the bot alias. The name is case sensitive.
        public let name: String

        @inlinable
        public init(botName: String, name: String) {
            self.botName = botName
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botName, key: "botName")
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBotAliasResponse: AWSDecodableShape {
        /// The name of the bot that the alias points to.
        public let botName: String?
        /// The version of the bot that the alias points to.
        public let botVersion: String?
        /// Checksum of the bot alias.
        public let checksum: String?
        /// The settings that determine how Amazon Lex uses conversation logs for the alias.
        public let conversationLogs: ConversationLogsResponse?
        /// The date that the bot alias was created.
        public let createdDate: Date?
        /// A description of the bot alias.
        public let description: String?
        /// The date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the bot alias.
        public let name: String?

        @inlinable
        public init(botName: String? = nil, botVersion: String? = nil, checksum: String? = nil, conversationLogs: ConversationLogsResponse? = nil, createdDate: Date? = nil, description: String? = nil, lastUpdatedDate: Date? = nil, name: String? = nil) {
            self.botName = botName
            self.botVersion = botVersion
            self.checksum = checksum
            self.conversationLogs = conversationLogs
            self.createdDate = createdDate
            self.description = description
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case botName = "botName"
            case botVersion = "botVersion"
            case checksum = "checksum"
            case conversationLogs = "conversationLogs"
            case createdDate = "createdDate"
            case description = "description"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
        }
    }

    public struct GetBotAliasesRequest: AWSEncodableShape {
        /// The name of the bot.
        public let botName: String
        /// The maximum number of aliases to return in the response. The default is 50. .
        public let maxResults: Int?
        /// Substring to match in bot alias names. An alias will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."
        public let nameContains: String?
        /// A pagination token for fetching the next page of aliases. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of aliases, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(botName: String, maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil) {
            self.botName = botName
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botName, key: "botName")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nameContains, key: "nameContains")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 100)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBotAliasesResponse: AWSDecodableShape {
        /// An array of BotAliasMetadata objects, each describing a bot alias.
        public let botAliases: [BotAliasMetadata]?
        /// A pagination token for fetching next page of aliases. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of aliases, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(botAliases: [BotAliasMetadata]? = nil, nextToken: String? = nil) {
            self.botAliases = botAliases
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botAliases = "BotAliases"
            case nextToken = "nextToken"
        }
    }

    public struct GetBotChannelAssociationRequest: AWSEncodableShape {
        /// An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.
        public let botAlias: String
        /// The name of the Amazon Lex bot.
        public let botName: String
        /// The name of the association between the bot and the channel. The name is case sensitive.
        public let name: String

        @inlinable
        public init(botAlias: String, botName: String, name: String) {
            self.botAlias = botAlias
            self.botName = botName
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botAlias, key: "botAlias")
            request.encodePath(self.botName, key: "botName")
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.botAlias, name: "botAlias", parent: name, max: 100)
            try self.validate(self.botAlias, name: "botAlias", parent: name, min: 1)
            try self.validate(self.botAlias, name: "botAlias", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBotChannelAssociationResponse: AWSDecodableShape {
        /// An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.
        public let botAlias: String?
        /// Provides information that the messaging platform needs to communicate with the Amazon Lex bot.
        public let botConfiguration: [String: String]?
        /// The name of the Amazon Lex bot.
        public let botName: String?
        /// The date that the association between the bot and the channel was created.
        public let createdDate: Date?
        /// A description of the association between the bot and the channel.
        public let description: String?
        /// If status is FAILED, Amazon Lex provides the reason that it failed to create the association.
        public let failureReason: String?
        /// The name of the association between the bot and the channel.
        public let name: String?
        /// The status of the bot channel.     CREATED - The channel has been created and is ready for use.    IN_PROGRESS - Channel creation is in progress.    FAILED - There was an error creating the channel. For information about the reason for the failure, see the failureReason field.
        public let status: ChannelStatus?
        /// The type of the messaging platform.
        public let type: ChannelType?

        @inlinable
        public init(botAlias: String? = nil, botConfiguration: [String: String]? = nil, botName: String? = nil, createdDate: Date? = nil, description: String? = nil, failureReason: String? = nil, name: String? = nil, status: ChannelStatus? = nil, type: ChannelType? = nil) {
            self.botAlias = botAlias
            self.botConfiguration = botConfiguration
            self.botName = botName
            self.createdDate = createdDate
            self.description = description
            self.failureReason = failureReason
            self.name = name
            self.status = status
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case botAlias = "botAlias"
            case botConfiguration = "botConfiguration"
            case botName = "botName"
            case createdDate = "createdDate"
            case description = "description"
            case failureReason = "failureReason"
            case name = "name"
            case status = "status"
            case type = "type"
        }
    }

    public struct GetBotChannelAssociationsRequest: AWSEncodableShape {
        /// An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.
        public let botAlias: String
        /// The name of the Amazon Lex bot in the association.
        public let botName: String
        /// The maximum number of associations to return in the response. The default is 50.
        public let maxResults: Int?
        /// Substring to match in channel association names. An association will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz." To return all bot channel associations, use a hyphen ("-") as the nameContains parameter.
        public let nameContains: String?
        /// A pagination token for fetching the next page of associations. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of associations, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(botAlias: String, botName: String, maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil) {
            self.botAlias = botAlias
            self.botName = botName
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botAlias, key: "botAlias")
            request.encodePath(self.botName, key: "botName")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nameContains, key: "nameContains")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.botAlias, name: "botAlias", parent: name, max: 100)
            try self.validate(self.botAlias, name: "botAlias", parent: name, min: 1)
            try self.validate(self.botAlias, name: "botAlias", parent: name, pattern: "^(-|^([A-Za-z]_?)+$)$")
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 100)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBotChannelAssociationsResponse: AWSDecodableShape {
        /// An array of objects, one for each association, that provides information about the Amazon Lex bot and its association with the channel.
        public let botChannelAssociations: [BotChannelAssociation]?
        /// A pagination token that fetches the next page of associations. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of associations, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(botChannelAssociations: [BotChannelAssociation]? = nil, nextToken: String? = nil) {
            self.botChannelAssociations = botChannelAssociations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botChannelAssociations = "botChannelAssociations"
            case nextToken = "nextToken"
        }
    }

    public struct GetBotRequest: AWSEncodableShape {
        /// The name of the bot. The name is case sensitive.
        public let name: String
        /// The version or alias of the bot.
        public let versionOrAlias: String

        @inlinable
        public init(name: String, versionOrAlias: String) {
            self.name = name
            self.versionOrAlias = versionOrAlias
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
            request.encodePath(self.versionOrAlias, key: "versionOrAlias")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBotResponse: AWSDecodableShape {
        /// The message that Amazon Lex returns when the user elects to end the conversation without completing it. For more information, see PutBot.
        public let abortStatement: Statement?
        /// Checksum of the bot used to identify a specific revision of the bot's $LATEST version.
        public let checksum: String?
        /// For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.
        public let childDirected: Bool?
        /// The message Amazon Lex uses when it doesn't understand the user's request. For more information, see PutBot.
        public let clarificationPrompt: Prompt?
        /// The date that the bot was created.
        public let createdDate: Date?
        /// A description of the bot.
        public let description: String?
        /// Indicates whether user utterances should be sent to Amazon Comprehend for sentiment analysis.
        public let detectSentiment: Bool?
        /// Indicates whether the bot uses accuracy improvements. true indicates that the bot is using the improvements, otherwise, false.
        public let enableModelImprovements: Bool?
        /// If status is FAILED, Amazon Lex explains why it failed to build the bot.
        public let failureReason: String?
        /// The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. For more information, see PutBot.
        public let idleSessionTTLInSeconds: Int?
        /// An array of intent objects. For more information, see PutBot.
        public let intents: [Intent]?
        /// The date that the bot was updated. When you create a resource, the creation date and last updated date are the same.
        public let lastUpdatedDate: Date?
        ///  The target locale for the bot.
        public let locale: Locale?
        /// The name of the bot.
        public let name: String?
        /// The score that determines where Amazon Lex inserts the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent is inserted if the confidence score for all intents is below this value. AMAZON.KendraSearchIntent is only inserted if it is configured for the bot.
        public let nluIntentConfidenceThreshold: Double?
        /// The status of the bot.  When the status is BUILDING Amazon Lex is building the bot for testing and use. If the status of the bot is READY_BASIC_TESTING, you can test the bot using the exact utterances specified in the bot's intents. When the bot is ready for full testing or to run, the status is READY. If there was a problem with building the bot, the status is FAILED and the failureReason field explains why the bot did not build. If the bot was saved but not built, the status is NOT_BUILT.
        public let status: Status?
        /// The version of the bot. For a new bot, the version is always $LATEST.
        public let version: String?
        /// The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. For more information, see PutBot.
        public let voiceId: String?

        @inlinable
        public init(abortStatement: Statement? = nil, checksum: String? = nil, childDirected: Bool? = nil, clarificationPrompt: Prompt? = nil, createdDate: Date? = nil, description: String? = nil, detectSentiment: Bool? = nil, enableModelImprovements: Bool? = nil, failureReason: String? = nil, idleSessionTTLInSeconds: Int? = nil, intents: [Intent]? = nil, lastUpdatedDate: Date? = nil, locale: Locale? = nil, name: String? = nil, nluIntentConfidenceThreshold: Double? = nil, status: Status? = nil, version: String? = nil, voiceId: String? = nil) {
            self.abortStatement = abortStatement
            self.checksum = checksum
            self.childDirected = childDirected
            self.clarificationPrompt = clarificationPrompt
            self.createdDate = createdDate
            self.description = description
            self.detectSentiment = detectSentiment
            self.enableModelImprovements = enableModelImprovements
            self.failureReason = failureReason
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.intents = intents
            self.lastUpdatedDate = lastUpdatedDate
            self.locale = locale
            self.name = name
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.status = status
            self.version = version
            self.voiceId = voiceId
        }

        private enum CodingKeys: String, CodingKey {
            case abortStatement = "abortStatement"
            case checksum = "checksum"
            case childDirected = "childDirected"
            case clarificationPrompt = "clarificationPrompt"
            case createdDate = "createdDate"
            case description = "description"
            case detectSentiment = "detectSentiment"
            case enableModelImprovements = "enableModelImprovements"
            case failureReason = "failureReason"
            case idleSessionTTLInSeconds = "idleSessionTTLInSeconds"
            case intents = "intents"
            case lastUpdatedDate = "lastUpdatedDate"
            case locale = "locale"
            case name = "name"
            case nluIntentConfidenceThreshold = "nluIntentConfidenceThreshold"
            case status = "status"
            case version = "version"
            case voiceId = "voiceId"
        }
    }

    public struct GetBotVersionsRequest: AWSEncodableShape {
        /// The maximum number of bot versions to return in the response. The default is 10.
        public let maxResults: Int?
        /// The name of the bot for which versions should be returned.
        public let name: String
        /// A pagination token for fetching the next page of bot versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, name: String, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodePath(self.name, key: "name")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBotVersionsResponse: AWSDecodableShape {
        /// An array of BotMetadata objects, one for each numbered version of the bot plus one for the $LATEST version.
        public let bots: [BotMetadata]?
        /// A pagination token for fetching the next page of bot versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(bots: [BotMetadata]? = nil, nextToken: String? = nil) {
            self.bots = bots
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case bots = "bots"
            case nextToken = "nextToken"
        }
    }

    public struct GetBotsRequest: AWSEncodableShape {
        /// The maximum number of bots to return in the response that the request will return. The default is 10.
        public let maxResults: Int?
        /// Substring to match in bot names. A bot will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."
        public let nameContains: String?
        /// A pagination token that fetches the next page of bots. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of bots, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nameContains, key: "nameContains")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 50)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 2)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBotsResponse: AWSDecodableShape {
        /// An array of botMetadata objects, with one entry for each bot.
        public let bots: [BotMetadata]?
        /// If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of bots.
        public let nextToken: String?

        @inlinable
        public init(bots: [BotMetadata]? = nil, nextToken: String? = nil) {
            self.bots = bots
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case bots = "bots"
            case nextToken = "nextToken"
        }
    }

    public struct GetBuiltinIntentRequest: AWSEncodableShape {
        /// The unique identifier for a built-in intent. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
        public let signature: String

        @inlinable
        public init(signature: String) {
            self.signature = signature
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.signature, key: "signature")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBuiltinIntentResponse: AWSDecodableShape {
        /// The unique identifier for a built-in intent.
        public let signature: String?
        /// An array of BuiltinIntentSlot objects, one entry for each slot type in the intent.
        public let slots: [BuiltinIntentSlot]?
        /// A list of locales that the intent supports.
        public let supportedLocales: [Locale]?

        @inlinable
        public init(signature: String? = nil, slots: [BuiltinIntentSlot]? = nil, supportedLocales: [Locale]? = nil) {
            self.signature = signature
            self.slots = slots
            self.supportedLocales = supportedLocales
        }

        private enum CodingKeys: String, CodingKey {
            case signature = "signature"
            case slots = "slots"
            case supportedLocales = "supportedLocales"
        }
    }

    public struct GetBuiltinIntentsRequest: AWSEncodableShape {
        /// A list of locales that the intent supports.
        public let locale: Locale?
        /// The maximum number of intents to return in the response. The default is 10.
        public let maxResults: Int?
        /// A pagination token that fetches the next page of intents. If this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of intents, use the pagination token in the next request.
        public let nextToken: String?
        /// Substring to match in built-in intent signatures. An intent will be returned if any part of its signature matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz." To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
        public let signatureContains: String?

        @inlinable
        public init(locale: Locale? = nil, maxResults: Int? = nil, nextToken: String? = nil, signatureContains: String? = nil) {
            self.locale = locale
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.signatureContains = signatureContains
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.locale, key: "locale")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.signatureContains, key: "signatureContains")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBuiltinIntentsResponse: AWSDecodableShape {
        /// An array of builtinIntentMetadata objects, one for each intent in the response.
        public let intents: [BuiltinIntentMetadata]?
        /// A pagination token that fetches the next page of intents. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of intents, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(intents: [BuiltinIntentMetadata]? = nil, nextToken: String? = nil) {
            self.intents = intents
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case intents = "intents"
            case nextToken = "nextToken"
        }
    }

    public struct GetBuiltinSlotTypesRequest: AWSEncodableShape {
        /// A list of locales that the slot type supports.
        public let locale: Locale?
        /// The maximum number of slot types to return in the response. The default is 10.
        public let maxResults: Int?
        /// A pagination token that fetches the next page of slot types. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of slot types, specify the pagination token in the next request.
        public let nextToken: String?
        /// Substring to match in built-in slot type signatures. A slot type will be returned if any part of its signature matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."
        public let signatureContains: String?

        @inlinable
        public init(locale: Locale? = nil, maxResults: Int? = nil, nextToken: String? = nil, signatureContains: String? = nil) {
            self.locale = locale
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.signatureContains = signatureContains
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.locale, key: "locale")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.signatureContains, key: "signatureContains")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBuiltinSlotTypesResponse: AWSDecodableShape {
        /// If the response is truncated, the response includes a pagination token that you can use in your next request to fetch the next page of slot types.
        public let nextToken: String?
        /// An array of BuiltInSlotTypeMetadata objects, one entry for each slot type returned.
        public let slotTypes: [BuiltinSlotTypeMetadata]?

        @inlinable
        public init(nextToken: String? = nil, slotTypes: [BuiltinSlotTypeMetadata]? = nil) {
            self.nextToken = nextToken
            self.slotTypes = slotTypes
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case slotTypes = "slotTypes"
        }
    }

    public struct GetExportRequest: AWSEncodableShape {
        /// The format of the exported data.
        public let exportType: ExportType
        /// The name of the bot to export.
        public let name: String
        /// The type of resource to export.
        public let resourceType: ResourceType
        /// The version of the bot to export.
        public let version: String

        @inlinable
        public init(exportType: ExportType, name: String, resourceType: ResourceType, version: String) {
            self.exportType = exportType
            self.name = name
            self.resourceType = resourceType
            self.version = version
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.exportType, key: "exportType")
            request.encodeQuery(self.name, key: "name")
            request.encodeQuery(self.resourceType, key: "resourceType")
            request.encodeQuery(self.version, key: "version")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z_]+$")
            try self.validate(self.version, name: "version", parent: name, max: 64)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetExportResponse: AWSDecodableShape {
        /// The status of the export.     IN_PROGRESS - The export is in progress.    READY - The export is complete.    FAILED - The export could not be completed.
        public let exportStatus: ExportStatus?
        /// The format of the exported data.
        public let exportType: ExportType?
        /// If status is FAILED, Amazon Lex provides the reason that it failed to export the resource.
        public let failureReason: String?
        /// The name of the bot being exported.
        public let name: String?
        /// The type of the exported resource.
        public let resourceType: ResourceType?
        /// An S3 pre-signed URL that provides the location of the exported resource. The exported resource is a ZIP archive that contains the exported resource in JSON format. The structure of the archive may change. Your code should not rely on the archive structure.
        public let url: String?
        /// The version of the bot being exported.
        public let version: String?

        @inlinable
        public init(exportStatus: ExportStatus? = nil, exportType: ExportType? = nil, failureReason: String? = nil, name: String? = nil, resourceType: ResourceType? = nil, url: String? = nil, version: String? = nil) {
            self.exportStatus = exportStatus
            self.exportType = exportType
            self.failureReason = failureReason
            self.name = name
            self.resourceType = resourceType
            self.url = url
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case exportStatus = "exportStatus"
            case exportType = "exportType"
            case failureReason = "failureReason"
            case name = "name"
            case resourceType = "resourceType"
            case url = "url"
            case version = "version"
        }
    }

    public struct GetImportRequest: AWSEncodableShape {
        /// The identifier of the import job information to return.
        public let importId: String

        @inlinable
        public init(importId: String) {
            self.importId = importId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.importId, key: "importId")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetImportResponse: AWSDecodableShape {
        /// A timestamp for the date and time that the import job was created.
        public let createdDate: Date?
        /// A string that describes why an import job failed to complete.
        public let failureReason: [String]?
        /// The identifier for the specific import job.
        public let importId: String?
        /// The status of the import job. If the status is FAILED, you can get the reason for the failure from the failureReason field.
        public let importStatus: ImportStatus?
        /// The action taken when there was a conflict between an existing resource and a resource in the import file.
        public let mergeStrategy: MergeStrategy?
        /// The name given to the import job.
        public let name: String?
        /// The type of resource imported.
        public let resourceType: ResourceType?

        @inlinable
        public init(createdDate: Date? = nil, failureReason: [String]? = nil, importId: String? = nil, importStatus: ImportStatus? = nil, mergeStrategy: MergeStrategy? = nil, name: String? = nil, resourceType: ResourceType? = nil) {
            self.createdDate = createdDate
            self.failureReason = failureReason
            self.importId = importId
            self.importStatus = importStatus
            self.mergeStrategy = mergeStrategy
            self.name = name
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "createdDate"
            case failureReason = "failureReason"
            case importId = "importId"
            case importStatus = "importStatus"
            case mergeStrategy = "mergeStrategy"
            case name = "name"
            case resourceType = "resourceType"
        }
    }

    public struct GetIntentRequest: AWSEncodableShape {
        /// The name of the intent. The name is case sensitive.
        public let name: String
        /// The version of the intent.
        public let version: String

        @inlinable
        public init(name: String, version: String) {
            self.name = name
            self.version = version
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
            request.encodePath(self.version, key: "version")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.version, name: "version", parent: name, max: 64)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^\\$LATEST|[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetIntentResponse: AWSDecodableShape {
        /// Checksum of the intent.
        public let checksum: String?
        /// After the Lambda function specified in the fulfillmentActivity element fulfills the intent, Amazon Lex conveys this statement to the user.
        public let conclusionStatement: Statement?
        /// If defined in the bot, Amazon Lex uses prompt to confirm the intent before fulfilling the user's request. For more information, see PutIntent.
        public let confirmationPrompt: Prompt?
        /// The date that the intent was created.
        public let createdDate: Date?
        /// A description of the intent.
        public let description: String?
        /// If defined in the bot, Amazon Amazon Lex invokes this Lambda function for each user input. For more information, see PutIntent.
        public let dialogCodeHook: CodeHook?
        /// If defined in the bot, Amazon Lex uses this prompt to solicit additional user activity after the intent is fulfilled. For more information, see PutIntent.
        public let followUpPrompt: FollowUpPrompt?
        /// Describes how the intent is fulfilled. For more information, see PutIntent.
        public let fulfillmentActivity: FulfillmentActivity?
        /// An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
        public let inputContexts: [InputContext]?
        /// Configuration information, if any, to connect to an Amazon Kendra index with the AMAZON.KendraSearchIntent intent.
        public let kendraConfiguration: KendraConfiguration?
        /// The date that the intent was updated. When you create a resource, the creation date and the last updated date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the intent.
        public let name: String?
        /// An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// A unique identifier for a built-in intent.
        public let parentIntentSignature: String?
        /// If the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
        public let rejectionStatement: Statement?
        /// An array of sample utterances configured for the intent.
        public let sampleUtterances: [String]?
        /// An array of intent slots configured for the intent.
        public let slots: [Slot]?
        /// The version of the intent.
        public let version: String?

        @inlinable
        public init(checksum: String? = nil, conclusionStatement: Statement? = nil, confirmationPrompt: Prompt? = nil, createdDate: Date? = nil, description: String? = nil, dialogCodeHook: CodeHook? = nil, followUpPrompt: FollowUpPrompt? = nil, fulfillmentActivity: FulfillmentActivity? = nil, inputContexts: [InputContext]? = nil, kendraConfiguration: KendraConfiguration? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, rejectionStatement: Statement? = nil, sampleUtterances: [String]? = nil, slots: [Slot]? = nil, version: String? = nil) {
            self.checksum = checksum
            self.conclusionStatement = conclusionStatement
            self.confirmationPrompt = confirmationPrompt
            self.createdDate = createdDate
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.followUpPrompt = followUpPrompt
            self.fulfillmentActivity = fulfillmentActivity
            self.inputContexts = inputContexts
            self.kendraConfiguration = kendraConfiguration
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.rejectionStatement = rejectionStatement
            self.sampleUtterances = sampleUtterances
            self.slots = slots
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case conclusionStatement = "conclusionStatement"
            case confirmationPrompt = "confirmationPrompt"
            case createdDate = "createdDate"
            case description = "description"
            case dialogCodeHook = "dialogCodeHook"
            case followUpPrompt = "followUpPrompt"
            case fulfillmentActivity = "fulfillmentActivity"
            case inputContexts = "inputContexts"
            case kendraConfiguration = "kendraConfiguration"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case outputContexts = "outputContexts"
            case parentIntentSignature = "parentIntentSignature"
            case rejectionStatement = "rejectionStatement"
            case sampleUtterances = "sampleUtterances"
            case slots = "slots"
            case version = "version"
        }
    }

    public struct GetIntentVersionsRequest: AWSEncodableShape {
        /// The maximum number of intent versions to return in the response. The default is 10.
        public let maxResults: Int?
        /// The name of the intent for which versions should be returned.
        public let name: String
        /// A pagination token for fetching the next page of intent versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, name: String, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodePath(self.name, key: "name")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetIntentVersionsResponse: AWSDecodableShape {
        /// An array of IntentMetadata objects, one for each numbered version of the intent plus one for the $LATEST version.
        public let intents: [IntentMetadata]?
        /// A pagination token for fetching the next page of intent versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(intents: [IntentMetadata]? = nil, nextToken: String? = nil) {
            self.intents = intents
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case intents = "intents"
            case nextToken = "nextToken"
        }
    }

    public struct GetIntentsRequest: AWSEncodableShape {
        /// The maximum number of intents to return in the response. The default is 10.
        public let maxResults: Int?
        /// Substring to match in intent names. An intent will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."
        public let nameContains: String?
        /// A pagination token that fetches the next page of intents. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of intents, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nameContains, key: "nameContains")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 100)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetIntentsResponse: AWSDecodableShape {
        /// An array of Intent objects. For more information, see PutBot.
        public let intents: [IntentMetadata]?
        /// If the response is truncated, the response includes a pagination token that you can specify in your next request to fetch the next page of intents.
        public let nextToken: String?

        @inlinable
        public init(intents: [IntentMetadata]? = nil, nextToken: String? = nil) {
            self.intents = intents
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case intents = "intents"
            case nextToken = "nextToken"
        }
    }

    public struct GetMigrationRequest: AWSEncodableShape {
        /// The unique identifier of the migration to view. The migrationID is returned by the  operation.
        public let migrationId: String

        @inlinable
        public init(migrationId: String) {
            self.migrationId = migrationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.migrationId, key: "migrationId")
        }

        public func validate(name: String) throws {
            try self.validate(self.migrationId, name: "migrationId", parent: name, max: 10)
            try self.validate(self.migrationId, name: "migrationId", parent: name, min: 10)
            try self.validate(self.migrationId, name: "migrationId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetMigrationResponse: AWSDecodableShape {
        /// A list of alerts and warnings that indicate issues with the migration for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1 feature has a different implementation if Amazon Lex V2. For more information, see Migrating a bot in the Amazon Lex V2 developer guide.
        public let alerts: [MigrationAlert]?
        /// The unique identifier of the migration. This is the same as the identifier used when calling the GetMigration operation.
        public let migrationId: String?
        /// Indicates the status of the migration. When the status is COMPLETE the migration is finished and the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.
        public let migrationStatus: MigrationStatus?
        /// The strategy used to conduct the migration.    CREATE_NEW - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.    UPDATE_EXISTING - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.
        public let migrationStrategy: MigrationStrategy?
        /// The date and time that the migration started.
        public let migrationTimestamp: Date?
        /// The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.
        public let v1BotLocale: Locale?
        /// The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.
        public let v1BotName: String?
        /// The version of the Amazon Lex V1 bot migrated to Amazon Lex V2.
        public let v1BotVersion: String?
        /// The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.
        public let v2BotId: String?
        /// The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.
        public let v2BotRole: String?

        @inlinable
        public init(alerts: [MigrationAlert]? = nil, migrationId: String? = nil, migrationStatus: MigrationStatus? = nil, migrationStrategy: MigrationStrategy? = nil, migrationTimestamp: Date? = nil, v1BotLocale: Locale? = nil, v1BotName: String? = nil, v1BotVersion: String? = nil, v2BotId: String? = nil, v2BotRole: String? = nil) {
            self.alerts = alerts
            self.migrationId = migrationId
            self.migrationStatus = migrationStatus
            self.migrationStrategy = migrationStrategy
            self.migrationTimestamp = migrationTimestamp
            self.v1BotLocale = v1BotLocale
            self.v1BotName = v1BotName
            self.v1BotVersion = v1BotVersion
            self.v2BotId = v2BotId
            self.v2BotRole = v2BotRole
        }

        private enum CodingKeys: String, CodingKey {
            case alerts = "alerts"
            case migrationId = "migrationId"
            case migrationStatus = "migrationStatus"
            case migrationStrategy = "migrationStrategy"
            case migrationTimestamp = "migrationTimestamp"
            case v1BotLocale = "v1BotLocale"
            case v1BotName = "v1BotName"
            case v1BotVersion = "v1BotVersion"
            case v2BotId = "v2BotId"
            case v2BotRole = "v2BotRole"
        }
    }

    public struct GetMigrationsRequest: AWSEncodableShape {
        /// The maximum number of migrations to return in the response. The default is 10.
        public let maxResults: Int?
        /// Filters the list to contain only migrations in the specified state.
        public let migrationStatusEquals: MigrationStatus?
        /// A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request.
        public let nextToken: String?
        /// The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started.
        public let sortByAttribute: MigrationSortAttribute?
        /// The order so sort the list.
        public let sortByOrder: SortOrder?
        /// Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name.
        public let v1BotNameContains: String?

        @inlinable
        public init(maxResults: Int? = nil, migrationStatusEquals: MigrationStatus? = nil, nextToken: String? = nil, sortByAttribute: MigrationSortAttribute? = nil, sortByOrder: SortOrder? = nil, v1BotNameContains: String? = nil) {
            self.maxResults = maxResults
            self.migrationStatusEquals = migrationStatusEquals
            self.nextToken = nextToken
            self.sortByAttribute = sortByAttribute
            self.sortByOrder = sortByOrder
            self.v1BotNameContains = v1BotNameContains
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.migrationStatusEquals, key: "migrationStatusEquals")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.sortByAttribute, key: "sortByAttribute")
            request.encodeQuery(self.sortByOrder, key: "sortByOrder")
            request.encodeQuery(self.v1BotNameContains, key: "v1BotNameContains")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.v1BotNameContains, name: "v1BotNameContains", parent: name, max: 50)
            try self.validate(self.v1BotNameContains, name: "v1BotNameContains", parent: name, min: 2)
            try self.validate(self.v1BotNameContains, name: "v1BotNameContains", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetMigrationsResponse: AWSDecodableShape {
        /// An array of summaries for migrations from Amazon Lex V1 to Amazon Lex V2. To see details of the migration, use the migrationId from the summary in a call to the  operation.
        public let migrationSummaries: [MigrationSummary]?
        /// If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of migrations.
        public let nextToken: String?

        @inlinable
        public init(migrationSummaries: [MigrationSummary]? = nil, nextToken: String? = nil) {
            self.migrationSummaries = migrationSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case migrationSummaries = "migrationSummaries"
            case nextToken = "nextToken"
        }
    }

    public struct GetSlotTypeRequest: AWSEncodableShape {
        /// The name of the slot type. The name is case sensitive.
        public let name: String
        /// The version of the slot type.
        public let version: String

        @inlinable
        public init(name: String, version: String) {
            self.name = name
            self.version = version
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
            request.encodePath(self.version, key: "version")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.version, name: "version", parent: name, max: 64)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^\\$LATEST|[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSlotTypeResponse: AWSDecodableShape {
        /// Checksum of the $LATEST version of the slot type.
        public let checksum: String?
        /// The date that the slot type was created.
        public let createdDate: Date?
        /// A description of the slot type.
        public let description: String?
        /// A list of EnumerationValue objects that defines the values that the slot type can take.
        public let enumerationValues: [EnumerationValue]?
        /// The date that the slot type was updated. When you create a resource, the creation date and last update date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the slot type.
        public let name: String?
        /// The built-in slot type used as a parent for the slot type.
        public let parentSlotTypeSignature: String?
        /// Configuration information that extends the parent built-in slot type.
        public let slotTypeConfigurations: [SlotTypeConfiguration]?
        /// The strategy that Amazon Lex uses to determine the value of the slot. For more information, see PutSlotType.
        public let valueSelectionStrategy: SlotValueSelectionStrategy?
        /// The version of the slot type.
        public let version: String?

        @inlinable
        public init(checksum: String? = nil, createdDate: Date? = nil, description: String? = nil, enumerationValues: [EnumerationValue]? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, parentSlotTypeSignature: String? = nil, slotTypeConfigurations: [SlotTypeConfiguration]? = nil, valueSelectionStrategy: SlotValueSelectionStrategy? = nil, version: String? = nil) {
            self.checksum = checksum
            self.createdDate = createdDate
            self.description = description
            self.enumerationValues = enumerationValues
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeConfigurations = slotTypeConfigurations
            self.valueSelectionStrategy = valueSelectionStrategy
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case createdDate = "createdDate"
            case description = "description"
            case enumerationValues = "enumerationValues"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case parentSlotTypeSignature = "parentSlotTypeSignature"
            case slotTypeConfigurations = "slotTypeConfigurations"
            case valueSelectionStrategy = "valueSelectionStrategy"
            case version = "version"
        }
    }

    public struct GetSlotTypeVersionsRequest: AWSEncodableShape {
        /// The maximum number of slot type versions to return in the response. The default is 10.
        public let maxResults: Int?
        /// The name of the slot type for which versions should be returned.
        public let name: String
        /// A pagination token for fetching the next page of slot type versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, name: String, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodePath(self.name, key: "name")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSlotTypeVersionsResponse: AWSDecodableShape {
        /// A pagination token for fetching the next page of slot type versions. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of versions, specify the pagination token in the next request.
        public let nextToken: String?
        /// An array of SlotTypeMetadata objects, one for each numbered version of the slot type plus one for the $LATEST version.
        public let slotTypes: [SlotTypeMetadata]?

        @inlinable
        public init(nextToken: String? = nil, slotTypes: [SlotTypeMetadata]? = nil) {
            self.nextToken = nextToken
            self.slotTypes = slotTypes
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case slotTypes = "slotTypes"
        }
    }

    public struct GetSlotTypesRequest: AWSEncodableShape {
        /// The maximum number of slot types to return in the response. The default is 10.
        public let maxResults: Int?
        /// Substring to match in slot type names. A slot type will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."
        public let nameContains: String?
        /// A pagination token that fetches the next page of slot types. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch next page of slot types, specify the pagination token in the next request.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nameContains, key: "nameContains")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 100)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSlotTypesResponse: AWSDecodableShape {
        /// If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of slot types.
        public let nextToken: String?
        /// An array of objects, one for each slot type, that provides information such as the name of the slot type, the version, and a description.
        public let slotTypes: [SlotTypeMetadata]?

        @inlinable
        public init(nextToken: String? = nil, slotTypes: [SlotTypeMetadata]? = nil) {
            self.nextToken = nextToken
            self.slotTypes = slotTypes
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case slotTypes = "slotTypes"
        }
    }

    public struct GetUtterancesViewRequest: AWSEncodableShape {
        /// The name of the bot for which utterance information should be returned.
        public let botName: String
        /// An array of bot versions for which utterance information should be returned. The limit is 5 versions per request.
        public let botVersions: [String]
        /// To return utterances that were recognized and handled, use Detected. To return utterances that were not recognized, use Missed.
        public let statusType: StatusType

        @inlinable
        public init(botName: String, botVersions: [String], statusType: StatusType) {
            self.botName = botName
            self.botVersions = botVersions
            self.statusType = statusType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botName, key: "botName")
            request.encodeQuery(self.botVersions, key: "bot_versions")
            request.encodeQuery(self.statusType, key: "status_type")
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.botVersions.forEach {
                try validate($0, name: "botVersions[]", parent: name, max: 64)
                try validate($0, name: "botVersions[]", parent: name, min: 1)
                try validate($0, name: "botVersions[]", parent: name, pattern: "^\\$LATEST|[0-9]+$")
            }
            try self.validate(self.botVersions, name: "botVersions", parent: name, max: 5)
            try self.validate(self.botVersions, name: "botVersions", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetUtterancesViewResponse: AWSDecodableShape {
        /// The name of the bot for which utterance information was returned.
        public let botName: String?
        /// An array of UtteranceList objects, each containing a list of UtteranceData objects describing the utterances that were processed by your bot. The response contains a maximum of 100 UtteranceData objects for each version. Amazon Lex returns the most frequent utterances received by the bot in the last 15 days.
        public let utterances: [UtteranceList]?

        @inlinable
        public init(botName: String? = nil, utterances: [UtteranceList]? = nil) {
            self.botName = botName
            self.utterances = utterances
        }

        private enum CodingKeys: String, CodingKey {
            case botName = "botName"
            case utterances = "utterances"
        }
    }

    public struct InputContext: AWSEncodableShape & AWSDecodableShape {
        /// The name of the context.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct Intent: AWSEncodableShape & AWSDecodableShape {
        /// The name of the intent.
        public let intentName: String
        /// The version of the intent.
        public let intentVersion: String

        @inlinable
        public init(intentName: String, intentVersion: String) {
            self.intentName = intentName
            self.intentVersion = intentVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.intentName, name: "intentName", parent: name, max: 100)
            try self.validate(self.intentName, name: "intentName", parent: name, min: 1)
            try self.validate(self.intentName, name: "intentName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.intentVersion, name: "intentVersion", parent: name, max: 64)
            try self.validate(self.intentVersion, name: "intentVersion", parent: name, min: 1)
            try self.validate(self.intentVersion, name: "intentVersion", parent: name, pattern: "^\\$LATEST|[0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case intentName = "intentName"
            case intentVersion = "intentVersion"
        }
    }

    public struct IntentMetadata: AWSDecodableShape {
        /// The date that the intent was created.
        public let createdDate: Date?
        /// A description of the intent.
        public let description: String?
        /// The date that the intent was updated. When you create an intent, the creation date and last updated date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the intent.
        public let name: String?
        /// The version of the intent.
        public let version: String?

        @inlinable
        public init(createdDate: Date? = nil, description: String? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, version: String? = nil) {
            self.createdDate = createdDate
            self.description = description
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "createdDate"
            case description = "description"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case version = "version"
        }
    }

    public struct KendraConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot. If the Amazon Kendra index does not exist, you get an exception when you call the PutIntent operation.
        public let kendraIndex: String
        /// A query filter that Amazon Lex sends to Amazon Kendra to filter the response from the query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries. You can override this filter string with a new filter string at runtime.
        public let queryFilterString: String?
        /// The Amazon Resource Name (ARN) of an IAM role that has permission to search the Amazon Kendra index. The role must be in the same account and Region as the Amazon Lex bot. If the role does not exist, you get an exception when you call the PutIntent operation.
        public let role: String

        @inlinable
        public init(kendraIndex: String, queryFilterString: String? = nil, role: String) {
            self.kendraIndex = kendraIndex
            self.queryFilterString = queryFilterString
            self.role = role
        }

        public func validate(name: String) throws {
            try self.validate(self.kendraIndex, name: "kendraIndex", parent: name, max: 2048)
            try self.validate(self.kendraIndex, name: "kendraIndex", parent: name, min: 20)
            try self.validate(self.kendraIndex, name: "kendraIndex", parent: name, pattern: "^arn:aws:kendra:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:index\\/[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.role, name: "role", parent: name, max: 2048)
            try self.validate(self.role, name: "role", parent: name, min: 20)
            try self.validate(self.role, name: "role", parent: name, pattern: "^arn:aws:iam::[0-9]{12}:role/")
        }

        private enum CodingKeys: String, CodingKey {
            case kendraIndex = "kendraIndex"
            case queryFilterString = "queryFilterString"
            case role = "role"
        }
    }

    public struct LimitExceededException: AWSErrorShape {
        public let message: String?
        public let retryAfterSeconds: String?

        @inlinable
        public init(message: String? = nil, retryAfterSeconds: String? = nil) {
            self.message = message
            self.retryAfterSeconds = retryAfterSeconds
        }

        public init(from decoder: Decoder) throws {
            let response = decoder.userInfo[.awsResponse]! as! ResponseDecodingContainer
            let container = try decoder.container(keyedBy: CodingKeys.self)
            self.message = try container.decodeIfPresent(String.self, forKey: .message)
            self.retryAfterSeconds = try response.decodeHeaderIfPresent(String.self, key: "Retry-After")
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to get a list of tags for.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags associated with a resource.
        public let tags: [Tag]?

        @inlinable
        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct LogSettingsRequest: AWSEncodableShape {
        /// Where the logs will be delivered. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket.
        public let destination: Destination
        /// The Amazon Resource Name (ARN) of the AWS KMS customer managed key for encrypting audio logs delivered to an S3 bucket. The key does not apply to CloudWatch Logs and is optional for S3 buckets.
        public let kmsKeyArn: String?
        /// The type of logging to enable. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket.
        public let logType: LogType
        /// The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs should be delivered.
        public let resourceArn: String

        @inlinable
        public init(destination: Destination, kmsKeyArn: String? = nil, logType: LogType, resourceArn: String) {
            self.destination = destination
            self.kmsKeyArn = kmsKeyArn
            self.logType = logType
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, max: 2048)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, min: 20)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, pattern: "^arn:[\\w\\-]+:kms:[\\w\\-]+:[\\d]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[\\w\\-]+:(?:logs:[\\w\\-]+:[\\d]{12}:log-group:[\\.\\-_/#A-Za-z0-9]{1,512}(?::\\*)?|s3:::[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9])$")
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
            case kmsKeyArn = "kmsKeyArn"
            case logType = "logType"
            case resourceArn = "resourceArn"
        }
    }

    public struct LogSettingsResponse: AWSDecodableShape {
        /// The destination where logs are delivered.
        public let destination: Destination?
        /// The Amazon Resource Name (ARN) of the key used to encrypt audio logs in an S3 bucket.
        public let kmsKeyArn: String?
        /// The type of logging that is enabled.
        public let logType: LogType?
        /// The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs are delivered.
        public let resourceArn: String?
        /// The resource prefix is the first part of the S3 object key within the S3 bucket that you specified to contain audio logs. For CloudWatch Logs it is the prefix of the log stream name within the log group that you specified.
        public let resourcePrefix: String?

        @inlinable
        public init(destination: Destination? = nil, kmsKeyArn: String? = nil, logType: LogType? = nil, resourceArn: String? = nil, resourcePrefix: String? = nil) {
            self.destination = destination
            self.kmsKeyArn = kmsKeyArn
            self.logType = logType
            self.resourceArn = resourceArn
            self.resourcePrefix = resourcePrefix
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
            case kmsKeyArn = "kmsKeyArn"
            case logType = "logType"
            case resourceArn = "resourceArn"
            case resourcePrefix = "resourcePrefix"
        }
    }

    public struct Message: AWSEncodableShape & AWSDecodableShape {
        /// The text of the message.
        public let content: String
        /// The content type of the message string.
        public let contentType: ContentType
        /// Identifies the message group that the message belongs to. When a group is assigned to a message, Amazon Lex returns one message from each group in the response.
        public let groupNumber: Int?

        @inlinable
        public init(content: String, contentType: ContentType, groupNumber: Int? = nil) {
            self.content = content
            self.contentType = contentType
            self.groupNumber = groupNumber
        }

        public func validate(name: String) throws {
            try self.validate(self.content, name: "content", parent: name, max: 1000)
            try self.validate(self.content, name: "content", parent: name, min: 1)
            try self.validate(self.groupNumber, name: "groupNumber", parent: name, max: 5)
            try self.validate(self.groupNumber, name: "groupNumber", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case content = "content"
            case contentType = "contentType"
            case groupNumber = "groupNumber"
        }
    }

    public struct MigrationAlert: AWSDecodableShape {
        /// Additional details about the alert.
        public let details: [String]?
        /// A message that describes why the alert was issued.
        public let message: String?
        /// A link to the Amazon Lex documentation that describes how to resolve the alert.
        public let referenceURLs: [String]?
        /// The type of alert. There are two kinds of alerts:    ERROR - There was an issue with the migration that can't be resolved. The migration stops.    WARN - There was an issue with the migration that requires manual changes to the new Amazon Lex V2 bot. The migration continues.
        public let type: MigrationAlertType?

        @inlinable
        public init(details: [String]? = nil, message: String? = nil, referenceURLs: [String]? = nil, type: MigrationAlertType? = nil) {
            self.details = details
            self.message = message
            self.referenceURLs = referenceURLs
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case details = "details"
            case message = "message"
            case referenceURLs = "referenceURLs"
            case type = "type"
        }
    }

    public struct MigrationSummary: AWSDecodableShape {
        /// The unique identifier that Amazon Lex assigned to the migration.
        public let migrationId: String?
        /// The status of the operation. When the status is COMPLETE the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.
        public let migrationStatus: MigrationStatus?
        /// The strategy used to conduct the migration.
        public let migrationStrategy: MigrationStrategy?
        /// The date and time that the migration started.
        public let migrationTimestamp: Date?
        /// The locale of the Amazon Lex V1 bot that is the source of the migration.
        public let v1BotLocale: Locale?
        /// The name of the Amazon Lex V1 bot that is the source of the migration.
        public let v1BotName: String?
        /// The version of the Amazon Lex V1 bot that is the source of the migration.
        public let v1BotVersion: String?
        /// The unique identifier of the Amazon Lex V2 that is the destination of the migration.
        public let v2BotId: String?
        /// The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.
        public let v2BotRole: String?

        @inlinable
        public init(migrationId: String? = nil, migrationStatus: MigrationStatus? = nil, migrationStrategy: MigrationStrategy? = nil, migrationTimestamp: Date? = nil, v1BotLocale: Locale? = nil, v1BotName: String? = nil, v1BotVersion: String? = nil, v2BotId: String? = nil, v2BotRole: String? = nil) {
            self.migrationId = migrationId
            self.migrationStatus = migrationStatus
            self.migrationStrategy = migrationStrategy
            self.migrationTimestamp = migrationTimestamp
            self.v1BotLocale = v1BotLocale
            self.v1BotName = v1BotName
            self.v1BotVersion = v1BotVersion
            self.v2BotId = v2BotId
            self.v2BotRole = v2BotRole
        }

        private enum CodingKeys: String, CodingKey {
            case migrationId = "migrationId"
            case migrationStatus = "migrationStatus"
            case migrationStrategy = "migrationStrategy"
            case migrationTimestamp = "migrationTimestamp"
            case v1BotLocale = "v1BotLocale"
            case v1BotName = "v1BotName"
            case v1BotVersion = "v1BotVersion"
            case v2BotId = "v2BotId"
            case v2BotRole = "v2BotRole"
        }
    }

    public struct OutputContext: AWSEncodableShape & AWSDecodableShape {
        /// The name of the context.
        public let name: String
        /// The number of seconds that the context should be active after it is first sent in a PostContent or PostText response. You can set the value between 5 and 86,400 seconds (24 hours).
        public let timeToLiveInSeconds: Int
        /// The number of conversation turns that the context should be active. A conversation turn is one PostContent or PostText request and the corresponding response from Amazon Lex.
        public let turnsToLive: Int

        @inlinable
        public init(name: String, timeToLiveInSeconds: Int, turnsToLive: Int) {
            self.name = name
            self.timeToLiveInSeconds = timeToLiveInSeconds
            self.turnsToLive = turnsToLive
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.timeToLiveInSeconds, name: "timeToLiveInSeconds", parent: name, max: 86400)
            try self.validate(self.timeToLiveInSeconds, name: "timeToLiveInSeconds", parent: name, min: 5)
            try self.validate(self.turnsToLive, name: "turnsToLive", parent: name, max: 20)
            try self.validate(self.turnsToLive, name: "turnsToLive", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case timeToLiveInSeconds = "timeToLiveInSeconds"
            case turnsToLive = "turnsToLive"
        }
    }

    public struct Prompt: AWSEncodableShape & AWSDecodableShape {
        /// The number of times to prompt the user for information.
        public let maxAttempts: Int
        /// An array of objects, each of which provides a message string and its type. You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
        public let messages: [Message]
        /// A response card. Amazon Lex uses this prompt at runtime, in the PostText API response. It substitutes session attributes and slot values for placeholders in the response card. For more information, see ex-resp-card.
        public let responseCard: String?

        @inlinable
        public init(maxAttempts: Int, messages: [Message], responseCard: String? = nil) {
            self.maxAttempts = maxAttempts
            self.messages = messages
            self.responseCard = responseCard
        }

        public func validate(name: String) throws {
            try self.validate(self.maxAttempts, name: "maxAttempts", parent: name, max: 5)
            try self.validate(self.maxAttempts, name: "maxAttempts", parent: name, min: 1)
            try self.messages.forEach {
                try $0.validate(name: "\(name).messages[]")
            }
            try self.validate(self.messages, name: "messages", parent: name, max: 15)
            try self.validate(self.messages, name: "messages", parent: name, min: 1)
            try self.validate(self.responseCard, name: "responseCard", parent: name, max: 50000)
            try self.validate(self.responseCard, name: "responseCard", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxAttempts = "maxAttempts"
            case messages = "messages"
            case responseCard = "responseCard"
        }
    }

    public struct PutBotAliasRequest: AWSEncodableShape {
        /// The name of the bot.
        public let botName: String
        /// The version of the bot.
        public let botVersion: String
        /// Identifies a specific revision of the $LATEST version. When you create a new bot alias, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a bot alias, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the  checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
        public let checksum: String?
        /// Settings for conversation logs for the alias.
        public let conversationLogs: ConversationLogsRequest?
        /// A description of the alias.
        public let description: String?
        /// The name of the alias. The name is not case sensitive.
        public let name: String
        /// A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the PutBotAlias operation to update the tags on a bot alias. To update tags, use the TagResource operation.
        public let tags: [Tag]?

        @inlinable
        public init(botName: String, botVersion: String, checksum: String? = nil, conversationLogs: ConversationLogsRequest? = nil, description: String? = nil, name: String, tags: [Tag]? = nil) {
            self.botName = botName
            self.botVersion = botVersion
            self.checksum = checksum
            self.conversationLogs = conversationLogs
            self.description = description
            self.name = name
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.botName, key: "botName")
            try container.encode(self.botVersion, forKey: .botVersion)
            try container.encodeIfPresent(self.checksum, forKey: .checksum)
            try container.encodeIfPresent(self.conversationLogs, forKey: .conversationLogs)
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.name, key: "name")
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 50)
            try self.validate(self.botName, name: "botName", parent: name, min: 2)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 64)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^\\$LATEST|[0-9]+$")
            try self.conversationLogs?.validate(name: "\(name).conversationLogs")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case botVersion = "botVersion"
            case checksum = "checksum"
            case conversationLogs = "conversationLogs"
            case description = "description"
            case tags = "tags"
        }
    }

    public struct PutBotAliasResponse: AWSDecodableShape {
        /// The name of the bot that the alias points to.
        public let botName: String?
        /// The version of the bot that the alias points to.
        public let botVersion: String?
        /// The checksum for the current version of the alias.
        public let checksum: String?
        /// The settings that determine how Amazon Lex uses conversation logs for the alias.
        public let conversationLogs: ConversationLogsResponse?
        /// The date that the bot alias was created.
        public let createdDate: Date?
        /// A description of the alias.
        public let description: String?
        /// The date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the alias.
        public let name: String?
        /// A list of tags associated with a bot.
        public let tags: [Tag]?

        @inlinable
        public init(botName: String? = nil, botVersion: String? = nil, checksum: String? = nil, conversationLogs: ConversationLogsResponse? = nil, createdDate: Date? = nil, description: String? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, tags: [Tag]? = nil) {
            self.botName = botName
            self.botVersion = botVersion
            self.checksum = checksum
            self.conversationLogs = conversationLogs
            self.createdDate = createdDate
            self.description = description
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case botName = "botName"
            case botVersion = "botVersion"
            case checksum = "checksum"
            case conversationLogs = "conversationLogs"
            case createdDate = "createdDate"
            case description = "description"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case tags = "tags"
        }
    }

    public struct PutBotRequest: AWSEncodableShape {
        /// When Amazon Lex can't understand the user's input in context, it tries to elicit the information a few times. After that, Amazon Lex sends the message defined in abortStatement to the user, and then cancels the conversation. To set the number of retries, use the valueElicitationPrompt field for the slot type.  For example, in a pizza ordering bot, Amazon Lex might ask a user "What type of crust would you like?" If the user's response is not one of the expected responses (for example, "thin crust, "deep dish," etc.), Amazon Lex tries to elicit a correct response a few more times.  For example, in a pizza ordering application, OrderPizza might be one of the intents. This intent might require the CrustType slot. You specify the valueElicitationPrompt field when you create the CrustType slot. If you have defined a fallback intent the cancel statement will not be sent to the user, the fallback intent is used instead. For more information, see  AMAZON.FallbackIntent.
        public let abortStatement: Statement?
        /// Identifies a specific revision of the $LATEST version. When you create a new bot, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a bot, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the  checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
        public let checksum: String?
        /// For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.
        public let childDirected: Bool
        /// When Amazon Lex doesn't understand the user's intent, it uses this message to get clarification. To specify how many times Amazon Lex should repeat the clarification prompt, use the maxAttempts field. If Amazon Lex still doesn't understand, it sends the message in the abortStatement field.  When you create a clarification prompt, make sure that it suggests the correct response from the user. for example, for a bot that orders pizza and drinks, you might create this clarification prompt: "What would you like to do? You can say 'Order a pizza' or 'Order a drink.'" If you have defined a fallback intent, it will be invoked if the clarification prompt is repeated the number of times defined in the maxAttempts field. For more information, see  AMAZON.FallbackIntent. If you don't define a clarification prompt, at runtime Amazon Lex will return a 400 Bad Request exception in three cases:    Follow-up prompt - When the user responds to a follow-up prompt but does not provide an intent. For example, in response to a follow-up prompt that says "Would you like anything else today?" the user says "Yes." Amazon Lex will return a 400 Bad Request exception because it does not have a clarification prompt to send to the user to get an intent.   Lambda function - When using a Lambda function, you return an ElicitIntent dialog type. Since Amazon Lex does not have a clarification prompt to get an intent from the user, it returns a 400 Bad Request exception.   PutSession operation - When using the PutSession operation, you send an ElicitIntent dialog type. Since Amazon Lex does not have a clarification prompt to get an intent from the user, it returns a 400 Bad Request exception.
        public let clarificationPrompt: Prompt?
        /// When set to true a new numbered version of the bot is created. This is the same as calling the CreateBotVersion operation. If you don't specify createVersion, the default is false.
        public let createVersion: Bool?
        /// A description of the bot.
        public let description: String?
        /// When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is false.
        public let detectSentiment: Bool?
        /// Set to true to enable access to natural language understanding improvements.  When you set the enableModelImprovements parameter to true you can use the nluIntentConfidenceThreshold parameter to configure confidence scores. For more information, see Confidence Scores. You can only set the enableModelImprovements parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. The Regions where you can set the enableModelImprovements parameter to true are:   US East (N. Virginia) (us-east-1)   US West (Oregon) (us-west-2)   Asia Pacific (Sydney) (ap-southeast-2)   EU (Ireland) (eu-west-1)   In other Regions, the enableModelImprovements parameter is set to true by default. In these Regions setting the parameter to false throws a ValidationException exception.
        public let enableModelImprovements: Bool?
        /// The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. A user interaction session remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout. For example, suppose that a user chooses the OrderPizza intent, but gets sidetracked halfway through placing an order. If the user doesn't complete the order within the specified time, Amazon Lex discards the slot information that it gathered, and the user must start over. If you don't include the idleSessionTTLInSeconds element in a PutBot operation request, Amazon Lex uses the default value. This is also true if the request replaces an existing bot. The default is 300 seconds (5 minutes).
        public let idleSessionTTLInSeconds: Int?
        /// An array of Intent objects. Each intent represents a command that a user can express. For example, a pizza ordering bot might support an OrderPizza intent. For more information, see how-it-works.
        public let intents: [Intent]?
        ///  Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.  The default is en-US.
        public let locale: Locale
        /// The name of the bot. The name is not case sensitive.
        public let name: String
        /// Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. You must set the enableModelImprovements parameter to true to use confidence scores in the following regions.   US East (N. Virginia) (us-east-1)   US West (Oregon) (us-west-2)   Asia Pacific (Sydney) (ap-southeast-2)   EU (Ireland) (eu-west-1)   In other Regions, the enableModelImprovements parameter is set to true by default. For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:   AMAZON.FallbackIntent   IntentA   IntentB   IntentC
        public let nluIntentConfidenceThreshold: Double?
        /// If you set the processBehavior element to BUILD, Amazon Lex builds the bot so that it can be run. If you set the element to SAVE Amazon Lex saves the bot, but doesn't build it.  If you don't specify this value, the default value is BUILD.
        public let processBehavior: ProcessBehavior?
        /// A list of tags to add to the bot. You can only add tags when you create a bot, you can't use the PutBot operation to update the tags on a bot. To update tags, use the TagResource operation.
        public let tags: [Tag]?
        /// The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see Voices in Amazon Polly in the Amazon Polly Developer Guide.
        public let voiceId: String?

        @inlinable
        public init(abortStatement: Statement? = nil, checksum: String? = nil, childDirected: Bool, clarificationPrompt: Prompt? = nil, createVersion: Bool? = nil, description: String? = nil, detectSentiment: Bool? = nil, enableModelImprovements: Bool? = nil, idleSessionTTLInSeconds: Int? = nil, intents: [Intent]? = nil, locale: Locale, name: String, nluIntentConfidenceThreshold: Double? = nil, processBehavior: ProcessBehavior? = nil, tags: [Tag]? = nil, voiceId: String? = nil) {
            self.abortStatement = abortStatement
            self.checksum = checksum
            self.childDirected = childDirected
            self.clarificationPrompt = clarificationPrompt
            self.createVersion = createVersion
            self.description = description
            self.detectSentiment = detectSentiment
            self.enableModelImprovements = enableModelImprovements
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.intents = intents
            self.locale = locale
            self.name = name
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.processBehavior = processBehavior
            self.tags = tags
            self.voiceId = voiceId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.abortStatement, forKey: .abortStatement)
            try container.encodeIfPresent(self.checksum, forKey: .checksum)
            try container.encode(self.childDirected, forKey: .childDirected)
            try container.encodeIfPresent(self.clarificationPrompt, forKey: .clarificationPrompt)
            try container.encodeIfPresent(self.createVersion, forKey: .createVersion)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.detectSentiment, forKey: .detectSentiment)
            try container.encodeIfPresent(self.enableModelImprovements, forKey: .enableModelImprovements)
            try container.encodeIfPresent(self.idleSessionTTLInSeconds, forKey: .idleSessionTTLInSeconds)
            try container.encodeIfPresent(self.intents, forKey: .intents)
            try container.encode(self.locale, forKey: .locale)
            request.encodePath(self.name, key: "name")
            try container.encodeIfPresent(self.nluIntentConfidenceThreshold, forKey: .nluIntentConfidenceThreshold)
            try container.encodeIfPresent(self.processBehavior, forKey: .processBehavior)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.voiceId, forKey: .voiceId)
        }

        public func validate(name: String) throws {
            try self.abortStatement?.validate(name: "\(name).abortStatement")
            try self.clarificationPrompt?.validate(name: "\(name).clarificationPrompt")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, max: 86400)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, min: 60)
            try self.intents?.forEach {
                try $0.validate(name: "\(name).intents[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 50)
            try self.validate(self.name, name: "name", parent: name, min: 2)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, max: 1.0)
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, min: 0.0)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case abortStatement = "abortStatement"
            case checksum = "checksum"
            case childDirected = "childDirected"
            case clarificationPrompt = "clarificationPrompt"
            case createVersion = "createVersion"
            case description = "description"
            case detectSentiment = "detectSentiment"
            case enableModelImprovements = "enableModelImprovements"
            case idleSessionTTLInSeconds = "idleSessionTTLInSeconds"
            case intents = "intents"
            case locale = "locale"
            case nluIntentConfidenceThreshold = "nluIntentConfidenceThreshold"
            case processBehavior = "processBehavior"
            case tags = "tags"
            case voiceId = "voiceId"
        }
    }

    public struct PutBotResponse: AWSDecodableShape {
        /// The message that Amazon Lex uses to cancel a conversation. For more information, see PutBot.
        public let abortStatement: Statement?
        /// Checksum of the bot that you created.
        public let checksum: String?
        /// For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.
        public let childDirected: Bool?
        ///  The prompts that Amazon Lex uses when it doesn't understand the user's intent. For more information, see PutBot.
        public let clarificationPrompt: Prompt?
        /// The date that the bot was created.
        public let createdDate: Date?
        ///  True if a new version of the bot was created. If the createVersion field was not specified in the request, the createVersion field is set to false in the response.
        public let createVersion: Bool?
        /// A description of the bot.
        public let description: String?
        ///  true if the bot is configured to send user utterances to Amazon Comprehend for sentiment analysis. If the detectSentiment field was not specified in the request, the detectSentiment field is false in the response.
        public let detectSentiment: Bool?
        /// Indicates whether the bot uses accuracy improvements. true indicates that the bot is using the improvements, otherwise, false.
        public let enableModelImprovements: Bool?
        /// If status is FAILED, Amazon Lex provides the reason that it failed to build the bot.
        public let failureReason: String?
        /// The maximum length of time that Amazon Lex retains the data gathered in a conversation. For more information, see PutBot.
        public let idleSessionTTLInSeconds: Int?
        /// An array of Intent objects. For more information, see PutBot.
        public let intents: [Intent]?
        /// The date that the bot was updated. When you create a resource, the creation date and last updated date are the same.
        public let lastUpdatedDate: Date?
        ///  The target locale for the bot.
        public let locale: Locale?
        /// The name of the bot.
        public let name: String?
        /// The score that determines where Amazon Lex inserts the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent is inserted if the confidence score for all intents is below this value. AMAZON.KendraSearchIntent is only inserted if it is configured for the bot.
        public let nluIntentConfidenceThreshold: Double?
        ///  When you send a request to create a bot with processBehavior set to BUILD, Amazon Lex sets the status response element to BUILDING. In the READY_BASIC_TESTING state you can test the bot with user inputs that exactly match the utterances configured for the bot's intents and values in the slot types. If Amazon Lex can't build the bot, Amazon Lex sets status to FAILED. Amazon Lex returns the reason for the failure in the failureReason response element.  When you set processBehavior to SAVE, Amazon Lex sets the status code to NOT BUILT. When the bot is in the READY state you can test and publish the bot.
        public let status: Status?
        /// A list of tags associated with the bot.
        public let tags: [Tag]?
        /// The version of the bot. For a new bot, the version is always $LATEST.
        public let version: String?
        /// The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. For more information, see PutBot.
        public let voiceId: String?

        @inlinable
        public init(abortStatement: Statement? = nil, checksum: String? = nil, childDirected: Bool? = nil, clarificationPrompt: Prompt? = nil, createdDate: Date? = nil, createVersion: Bool? = nil, description: String? = nil, detectSentiment: Bool? = nil, enableModelImprovements: Bool? = nil, failureReason: String? = nil, idleSessionTTLInSeconds: Int? = nil, intents: [Intent]? = nil, lastUpdatedDate: Date? = nil, locale: Locale? = nil, name: String? = nil, nluIntentConfidenceThreshold: Double? = nil, status: Status? = nil, tags: [Tag]? = nil, version: String? = nil, voiceId: String? = nil) {
            self.abortStatement = abortStatement
            self.checksum = checksum
            self.childDirected = childDirected
            self.clarificationPrompt = clarificationPrompt
            self.createdDate = createdDate
            self.createVersion = createVersion
            self.description = description
            self.detectSentiment = detectSentiment
            self.enableModelImprovements = enableModelImprovements
            self.failureReason = failureReason
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.intents = intents
            self.lastUpdatedDate = lastUpdatedDate
            self.locale = locale
            self.name = name
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.status = status
            self.tags = tags
            self.version = version
            self.voiceId = voiceId
        }

        private enum CodingKeys: String, CodingKey {
            case abortStatement = "abortStatement"
            case checksum = "checksum"
            case childDirected = "childDirected"
            case clarificationPrompt = "clarificationPrompt"
            case createdDate = "createdDate"
            case createVersion = "createVersion"
            case description = "description"
            case detectSentiment = "detectSentiment"
            case enableModelImprovements = "enableModelImprovements"
            case failureReason = "failureReason"
            case idleSessionTTLInSeconds = "idleSessionTTLInSeconds"
            case intents = "intents"
            case lastUpdatedDate = "lastUpdatedDate"
            case locale = "locale"
            case name = "name"
            case nluIntentConfidenceThreshold = "nluIntentConfidenceThreshold"
            case status = "status"
            case tags = "tags"
            case version = "version"
            case voiceId = "voiceId"
        }
    }

    public struct PutIntentRequest: AWSEncodableShape {
        /// Identifies a specific revision of the $LATEST version. When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the  checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
        public let checksum: String?
        ///  The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.  This element is relevant only if you provide a Lambda function in the fulfillmentActivity. If you return the intent to the client application, you can't specify this element.  The followUpPrompt and conclusionStatement are mutually exclusive. You can specify only one.
        public let conclusionStatement: Statement?
        /// Prompts the user to confirm the intent. This question should have a yes or no answer. Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.   You you must provide both the rejectionStatement and the confirmationPrompt, or neither.
        public let confirmationPrompt: Prompt?
        /// When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false.
        public let createVersion: Bool?
        /// A description of the intent.
        public let description: String?
        ///  Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.  For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, GlutenIntolerant, to true. You might find John's phone number and set the corresponding session attribute.
        public let dialogCodeHook: CodeHook?
        /// Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the user to order a drink. The action that Amazon Lex takes depends on the user's response, as follows:   If the user says "Yes" it responds with the clarification prompt that is configured for the bot.   if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.   If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.   If it doesn't recognize the utterance it repeats the follow-up prompt again.   The followUpPrompt field and the conclusionStatement field are mutually exclusive. You can specify only one.
        public let followUpPrompt: FollowUpPrompt?
        /// Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, fulfillmentActivity defines how the bot places an order with a local pizza store.  You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).
        public let fulfillmentActivity: FulfillmentActivity?
        /// An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
        public let inputContexts: [InputContext]?
        /// Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. For more information, see  AMAZON.KendraSearchIntent.
        public let kendraConfiguration: KendraConfiguration?
        /// The name of the intent. The name is not case sensitive.  The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent. For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.
        public let name: String
        /// An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
        public let parentIntentSignature: String?
        /// When the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.   You must provide both the rejectionStatement and the confirmationPrompt, or neither.
        public let rejectionStatement: Statement?
        /// An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".  In each utterance, a slot name is enclosed in curly braces.
        public let sampleUtterances: [String]?
        /// An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.
        public let slots: [Slot]?

        @inlinable
        public init(checksum: String? = nil, conclusionStatement: Statement? = nil, confirmationPrompt: Prompt? = nil, createVersion: Bool? = nil, description: String? = nil, dialogCodeHook: CodeHook? = nil, followUpPrompt: FollowUpPrompt? = nil, fulfillmentActivity: FulfillmentActivity? = nil, inputContexts: [InputContext]? = nil, kendraConfiguration: KendraConfiguration? = nil, name: String, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, rejectionStatement: Statement? = nil, sampleUtterances: [String]? = nil, slots: [Slot]? = nil) {
            self.checksum = checksum
            self.conclusionStatement = conclusionStatement
            self.confirmationPrompt = confirmationPrompt
            self.createVersion = createVersion
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.followUpPrompt = followUpPrompt
            self.fulfillmentActivity = fulfillmentActivity
            self.inputContexts = inputContexts
            self.kendraConfiguration = kendraConfiguration
            self.name = name
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.rejectionStatement = rejectionStatement
            self.sampleUtterances = sampleUtterances
            self.slots = slots
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.checksum, forKey: .checksum)
            try container.encodeIfPresent(self.conclusionStatement, forKey: .conclusionStatement)
            try container.encodeIfPresent(self.confirmationPrompt, forKey: .confirmationPrompt)
            try container.encodeIfPresent(self.createVersion, forKey: .createVersion)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.dialogCodeHook, forKey: .dialogCodeHook)
            try container.encodeIfPresent(self.followUpPrompt, forKey: .followUpPrompt)
            try container.encodeIfPresent(self.fulfillmentActivity, forKey: .fulfillmentActivity)
            try container.encodeIfPresent(self.inputContexts, forKey: .inputContexts)
            try container.encodeIfPresent(self.kendraConfiguration, forKey: .kendraConfiguration)
            request.encodePath(self.name, key: "name")
            try container.encodeIfPresent(self.outputContexts, forKey: .outputContexts)
            try container.encodeIfPresent(self.parentIntentSignature, forKey: .parentIntentSignature)
            try container.encodeIfPresent(self.rejectionStatement, forKey: .rejectionStatement)
            try container.encodeIfPresent(self.sampleUtterances, forKey: .sampleUtterances)
            try container.encodeIfPresent(self.slots, forKey: .slots)
        }

        public func validate(name: String) throws {
            try self.conclusionStatement?.validate(name: "\(name).conclusionStatement")
            try self.confirmationPrompt?.validate(name: "\(name).confirmationPrompt")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.dialogCodeHook?.validate(name: "\(name).dialogCodeHook")
            try self.followUpPrompt?.validate(name: "\(name).followUpPrompt")
            try self.fulfillmentActivity?.validate(name: "\(name).fulfillmentActivity")
            try self.inputContexts?.forEach {
                try $0.validate(name: "\(name).inputContexts[]")
            }
            try self.validate(self.inputContexts, name: "inputContexts", parent: name, max: 5)
            try self.kendraConfiguration?.validate(name: "\(name).kendraConfiguration")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.outputContexts?.forEach {
                try $0.validate(name: "\(name).outputContexts[]")
            }
            try self.validate(self.outputContexts, name: "outputContexts", parent: name, max: 10)
            try self.rejectionStatement?.validate(name: "\(name).rejectionStatement")
            try self.sampleUtterances?.forEach {
                try validate($0, name: "sampleUtterances[]", parent: name, max: 200)
                try validate($0, name: "sampleUtterances[]", parent: name, min: 1)
            }
            try self.validate(self.sampleUtterances, name: "sampleUtterances", parent: name, max: 1500)
            try self.slots?.forEach {
                try $0.validate(name: "\(name).slots[]")
            }
            try self.validate(self.slots, name: "slots", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case conclusionStatement = "conclusionStatement"
            case confirmationPrompt = "confirmationPrompt"
            case createVersion = "createVersion"
            case description = "description"
            case dialogCodeHook = "dialogCodeHook"
            case followUpPrompt = "followUpPrompt"
            case fulfillmentActivity = "fulfillmentActivity"
            case inputContexts = "inputContexts"
            case kendraConfiguration = "kendraConfiguration"
            case outputContexts = "outputContexts"
            case parentIntentSignature = "parentIntentSignature"
            case rejectionStatement = "rejectionStatement"
            case sampleUtterances = "sampleUtterances"
            case slots = "slots"
        }
    }

    public struct PutIntentResponse: AWSDecodableShape {
        /// Checksum of the $LATESTversion of the intent created or updated.
        public let checksum: String?
        /// After the Lambda function specified in thefulfillmentActivityintent fulfills the intent, Amazon Lex conveys this statement to the user.
        public let conclusionStatement: Statement?
        /// If defined in the intent, Amazon Lex prompts the user to confirm the intent before fulfilling it.
        public let confirmationPrompt: Prompt?
        /// The date that the intent was created.
        public let createdDate: Date?
        ///  True if a new version of the intent was created. If the createVersion field was not specified in the request, the createVersion field is set to false in the response.
        public let createVersion: Bool?
        /// A description of the intent.
        public let description: String?
        /// If defined in the intent, Amazon Lex invokes this Lambda function for each user input.
        public let dialogCodeHook: CodeHook?
        /// If defined in the intent, Amazon Lex uses this prompt to solicit additional user activity after the intent is fulfilled.
        public let followUpPrompt: FollowUpPrompt?
        /// If defined in the intent, Amazon Lex invokes this Lambda function to fulfill the intent after the user provides all of the information required by the intent.
        public let fulfillmentActivity: FulfillmentActivity?
        /// An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
        public let inputContexts: [InputContext]?
        /// Configuration information, if any, required to connect to an Amazon Kendra index and use the AMAZON.KendraSearchIntent intent.
        public let kendraConfiguration: KendraConfiguration?
        /// The date that the intent was updated. When you create a resource, the creation date and last update dates are the same.
        public let lastUpdatedDate: Date?
        /// The name of the intent.
        public let name: String?
        /// An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// A unique identifier for the built-in intent that this intent is based on.
        public let parentIntentSignature: String?
        /// If the user answers "no" to the question defined in confirmationPrompt Amazon Lex responds with this statement to acknowledge that the intent was canceled.
        public let rejectionStatement: Statement?
        ///  An array of sample utterances that are configured for the intent.
        public let sampleUtterances: [String]?
        /// An array of intent slots that are configured for the intent.
        public let slots: [Slot]?
        /// The version of the intent. For a new intent, the version is always $LATEST.
        public let version: String?

        @inlinable
        public init(checksum: String? = nil, conclusionStatement: Statement? = nil, confirmationPrompt: Prompt? = nil, createdDate: Date? = nil, createVersion: Bool? = nil, description: String? = nil, dialogCodeHook: CodeHook? = nil, followUpPrompt: FollowUpPrompt? = nil, fulfillmentActivity: FulfillmentActivity? = nil, inputContexts: [InputContext]? = nil, kendraConfiguration: KendraConfiguration? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, rejectionStatement: Statement? = nil, sampleUtterances: [String]? = nil, slots: [Slot]? = nil, version: String? = nil) {
            self.checksum = checksum
            self.conclusionStatement = conclusionStatement
            self.confirmationPrompt = confirmationPrompt
            self.createdDate = createdDate
            self.createVersion = createVersion
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.followUpPrompt = followUpPrompt
            self.fulfillmentActivity = fulfillmentActivity
            self.inputContexts = inputContexts
            self.kendraConfiguration = kendraConfiguration
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.rejectionStatement = rejectionStatement
            self.sampleUtterances = sampleUtterances
            self.slots = slots
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case conclusionStatement = "conclusionStatement"
            case confirmationPrompt = "confirmationPrompt"
            case createdDate = "createdDate"
            case createVersion = "createVersion"
            case description = "description"
            case dialogCodeHook = "dialogCodeHook"
            case followUpPrompt = "followUpPrompt"
            case fulfillmentActivity = "fulfillmentActivity"
            case inputContexts = "inputContexts"
            case kendraConfiguration = "kendraConfiguration"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case outputContexts = "outputContexts"
            case parentIntentSignature = "parentIntentSignature"
            case rejectionStatement = "rejectionStatement"
            case sampleUtterances = "sampleUtterances"
            case slots = "slots"
            case version = "version"
        }
    }

    public struct PutSlotTypeRequest: AWSEncodableShape {
        /// Identifies a specific revision of the $LATEST version. When you create a new slot type, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a slot type, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the  checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
        public let checksum: String?
        /// When set to true a new numbered version of the slot type is created. This is the same as calling the CreateSlotTypeVersion operation. If you do not specify createVersion, the default is false.
        public let createVersion: Bool?
        /// A description of the slot type.
        public let description: String?
        /// A list of EnumerationValue objects that defines the values that the slot type can take. Each value can have a list of synonyms, which are additional values that help train the machine learning model about the values that it resolves for a slot.  A regular expression slot type doesn't require enumeration values. All other slot types require a list of enumeration values. When Amazon Lex resolves a slot value, it generates a resolution list that contains up to five possible values for the slot. If you are using a Lambda function, this resolution list is passed to the function. If you are not using a Lambda function you can choose to return the value that the user entered or the first value in the resolution list as the slot value. The valueSelectionStrategy field indicates the option to use.
        public let enumerationValues: [EnumerationValue]?
        /// The name of the slot type. The name is not case sensitive.  The name can't match a built-in slot type name, or a built-in slot type name with "AMAZON." removed. For example, because there is a built-in slot type called AMAZON.DATE, you can't create a custom slot type called DATE. For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit.
        public let name: String
        /// The built-in slot type used as the parent of the slot type. When you define a parent slot type, the new slot type has all of the same configuration as the parent. Only AMAZON.AlphaNumeric is supported.
        public let parentSlotTypeSignature: String?
        /// Configuration information that extends the parent built-in slot type. The configuration is added to the settings for the parent slot type.
        public let slotTypeConfigurations: [SlotTypeConfiguration]?
        /// Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:    ORIGINAL_VALUE - Returns the value entered by the user, if the user value is similar to the slot value.    TOP_RESOLUTION - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.   If you don't specify the valueSelectionStrategy, the default is ORIGINAL_VALUE.
        public let valueSelectionStrategy: SlotValueSelectionStrategy?

        @inlinable
        public init(checksum: String? = nil, createVersion: Bool? = nil, description: String? = nil, enumerationValues: [EnumerationValue]? = nil, name: String, parentSlotTypeSignature: String? = nil, slotTypeConfigurations: [SlotTypeConfiguration]? = nil, valueSelectionStrategy: SlotValueSelectionStrategy? = nil) {
            self.checksum = checksum
            self.createVersion = createVersion
            self.description = description
            self.enumerationValues = enumerationValues
            self.name = name
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeConfigurations = slotTypeConfigurations
            self.valueSelectionStrategy = valueSelectionStrategy
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.checksum, forKey: .checksum)
            try container.encodeIfPresent(self.createVersion, forKey: .createVersion)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.enumerationValues, forKey: .enumerationValues)
            request.encodePath(self.name, key: "name")
            try container.encodeIfPresent(self.parentSlotTypeSignature, forKey: .parentSlotTypeSignature)
            try container.encodeIfPresent(self.slotTypeConfigurations, forKey: .slotTypeConfigurations)
            try container.encodeIfPresent(self.valueSelectionStrategy, forKey: .valueSelectionStrategy)
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.enumerationValues?.forEach {
                try $0.validate(name: "\(name).enumerationValues[]")
            }
            try self.validate(self.enumerationValues, name: "enumerationValues", parent: name, max: 10000)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.parentSlotTypeSignature, name: "parentSlotTypeSignature", parent: name, max: 100)
            try self.validate(self.parentSlotTypeSignature, name: "parentSlotTypeSignature", parent: name, min: 1)
            try self.validate(self.parentSlotTypeSignature, name: "parentSlotTypeSignature", parent: name, pattern: "^((AMAZON\\.)_?|[A-Za-z]_?)+$")
            try self.slotTypeConfigurations?.forEach {
                try $0.validate(name: "\(name).slotTypeConfigurations[]")
            }
            try self.validate(self.slotTypeConfigurations, name: "slotTypeConfigurations", parent: name, max: 10)
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case createVersion = "createVersion"
            case description = "description"
            case enumerationValues = "enumerationValues"
            case parentSlotTypeSignature = "parentSlotTypeSignature"
            case slotTypeConfigurations = "slotTypeConfigurations"
            case valueSelectionStrategy = "valueSelectionStrategy"
        }
    }

    public struct PutSlotTypeResponse: AWSDecodableShape {
        /// Checksum of the $LATEST version of the slot type.
        public let checksum: String?
        /// The date that the slot type was created.
        public let createdDate: Date?
        ///  True if a new version of the slot type was created. If the createVersion field was not specified in the request, the createVersion field is set to false in the response.
        public let createVersion: Bool?
        /// A description of the slot type.
        public let description: String?
        /// A list of EnumerationValue objects that defines the values that the slot type can take.
        public let enumerationValues: [EnumerationValue]?
        /// The date that the slot type was updated. When you create a slot type, the creation date and last update date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the slot type.
        public let name: String?
        /// The built-in slot type used as the parent of the slot type.
        public let parentSlotTypeSignature: String?
        /// Configuration information that extends the parent built-in slot type.
        public let slotTypeConfigurations: [SlotTypeConfiguration]?
        /// The slot resolution strategy that Amazon Lex uses to determine the value of the slot. For more information, see PutSlotType.
        public let valueSelectionStrategy: SlotValueSelectionStrategy?
        /// The version of the slot type. For a new slot type, the version is always $LATEST.
        public let version: String?

        @inlinable
        public init(checksum: String? = nil, createdDate: Date? = nil, createVersion: Bool? = nil, description: String? = nil, enumerationValues: [EnumerationValue]? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, parentSlotTypeSignature: String? = nil, slotTypeConfigurations: [SlotTypeConfiguration]? = nil, valueSelectionStrategy: SlotValueSelectionStrategy? = nil, version: String? = nil) {
            self.checksum = checksum
            self.createdDate = createdDate
            self.createVersion = createVersion
            self.description = description
            self.enumerationValues = enumerationValues
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeConfigurations = slotTypeConfigurations
            self.valueSelectionStrategy = valueSelectionStrategy
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case checksum = "checksum"
            case createdDate = "createdDate"
            case createVersion = "createVersion"
            case description = "description"
            case enumerationValues = "enumerationValues"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case parentSlotTypeSignature = "parentSlotTypeSignature"
            case slotTypeConfigurations = "slotTypeConfigurations"
            case valueSelectionStrategy = "valueSelectionStrategy"
            case version = "version"
        }
    }

    public struct ResourceInUseException: AWSErrorShape {
        public let exampleReference: ResourceReference?
        public let referenceType: ReferenceType?

        @inlinable
        public init(exampleReference: ResourceReference? = nil, referenceType: ReferenceType? = nil) {
            self.exampleReference = exampleReference
            self.referenceType = referenceType
        }

        private enum CodingKeys: String, CodingKey {
            case exampleReference = "exampleReference"
            case referenceType = "referenceType"
        }
    }

    public struct ResourceReference: AWSDecodableShape {
        /// The name of the resource that is using the resource that you are trying to delete.
        public let name: String?
        /// The version of the resource that is using the resource that you are trying to delete.
        public let version: String?

        @inlinable
        public init(name: String? = nil, version: String? = nil) {
            self.name = name
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case version = "version"
        }
    }

    public struct Slot: AWSEncodableShape & AWSDecodableShape {
        /// A list of default values for the slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.
        public let defaultValueSpec: SlotDefaultValueSpec?
        /// A description of the slot.
        public let description: String?
        /// The name of the slot.
        public let name: String
        /// Determines whether a slot is obfuscated in conversation logs and stored utterances. When you obfuscate a slot, the value is replaced by the slot name in curly braces ({}). For example, if the slot name is "full_name", obfuscated values are replaced with "{full_name}". For more information, see  Slot Obfuscation .
        public let obfuscationSetting: ObfuscationSetting?
        ///  Directs Amazon Lex the order in which to elicit this slot value from the user. For example, if the intent has two slots with priorities 1 and 2, AWS Amazon Lex first elicits a value for the slot with priority 1. If multiple slots share the same priority, the order in which Amazon Lex elicits values is arbitrary.
        public let priority: Int?
        ///  A set of possible responses for the slot type used by text-based clients. A user chooses an option from the response card, instead of using text to reply.
        public let responseCard: String?
        ///  If you know a specific pattern with which users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.
        public let sampleUtterances: [String]?
        /// Specifies whether the slot is required or optional.
        public let slotConstraint: SlotConstraint
        /// The type of the slot, either a custom slot type that you defined or one of the built-in slot types.
        public let slotType: String?
        /// The version of the slot type.
        public let slotTypeVersion: String?
        /// The prompt that Amazon Lex uses to elicit the slot value from the user.
        public let valueElicitationPrompt: Prompt?

        @inlinable
        public init(defaultValueSpec: SlotDefaultValueSpec? = nil, description: String? = nil, name: String, obfuscationSetting: ObfuscationSetting? = nil, priority: Int? = nil, responseCard: String? = nil, sampleUtterances: [String]? = nil, slotConstraint: SlotConstraint, slotType: String? = nil, slotTypeVersion: String? = nil, valueElicitationPrompt: Prompt? = nil) {
            self.defaultValueSpec = defaultValueSpec
            self.description = description
            self.name = name
            self.obfuscationSetting = obfuscationSetting
            self.priority = priority
            self.responseCard = responseCard
            self.sampleUtterances = sampleUtterances
            self.slotConstraint = slotConstraint
            self.slotType = slotType
            self.slotTypeVersion = slotTypeVersion
            self.valueElicitationPrompt = valueElicitationPrompt
        }

        public func validate(name: String) throws {
            try self.defaultValueSpec?.validate(name: "\(name).defaultValueSpec")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([A-Za-z](-|_|.)?)+$")
            try self.validate(self.priority, name: "priority", parent: name, max: 100)
            try self.validate(self.priority, name: "priority", parent: name, min: 0)
            try self.validate(self.responseCard, name: "responseCard", parent: name, max: 50000)
            try self.validate(self.responseCard, name: "responseCard", parent: name, min: 1)
            try self.sampleUtterances?.forEach {
                try validate($0, name: "sampleUtterances[]", parent: name, max: 200)
                try validate($0, name: "sampleUtterances[]", parent: name, min: 1)
            }
            try self.validate(self.sampleUtterances, name: "sampleUtterances", parent: name, max: 10)
            try self.validate(self.slotType, name: "slotType", parent: name, max: 100)
            try self.validate(self.slotType, name: "slotType", parent: name, min: 1)
            try self.validate(self.slotType, name: "slotType", parent: name, pattern: "^((AMAZON\\.)_?|[A-Za-z]_?)+$")
            try self.validate(self.slotTypeVersion, name: "slotTypeVersion", parent: name, max: 64)
            try self.validate(self.slotTypeVersion, name: "slotTypeVersion", parent: name, min: 1)
            try self.validate(self.slotTypeVersion, name: "slotTypeVersion", parent: name, pattern: "^\\$LATEST|[0-9]+$")
            try self.valueElicitationPrompt?.validate(name: "\(name).valueElicitationPrompt")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValueSpec = "defaultValueSpec"
            case description = "description"
            case name = "name"
            case obfuscationSetting = "obfuscationSetting"
            case priority = "priority"
            case responseCard = "responseCard"
            case sampleUtterances = "sampleUtterances"
            case slotConstraint = "slotConstraint"
            case slotType = "slotType"
            case slotTypeVersion = "slotTypeVersion"
            case valueElicitationPrompt = "valueElicitationPrompt"
        }
    }

    public struct SlotDefaultValue: AWSEncodableShape & AWSDecodableShape {
        /// The default value for the slot. You can specify one of the following:    #context-name.slot-name - The slot value "slot-name" in the context "context-name."    {attribute} - The slot value of the session attribute "attribute."    'value' - The discrete value "value."
        public let defaultValue: String

        @inlinable
        public init(defaultValue: String) {
            self.defaultValue = defaultValue
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, max: 202)
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue = "defaultValue"
        }
    }

    public struct SlotDefaultValueSpec: AWSEncodableShape & AWSDecodableShape {
        /// The default values for a slot. You can specify more than one default. For example, you can specify a default value to use from a matching context variable, a session attribute, or a fixed value. The default value chosen is selected based on the order that you specify them in the list. For example, if you specify a context variable and a fixed value in that order, Amazon Lex uses the context variable if it is available, else it uses the fixed value.
        public let defaultValueList: [SlotDefaultValue]

        @inlinable
        public init(defaultValueList: [SlotDefaultValue]) {
            self.defaultValueList = defaultValueList
        }

        public func validate(name: String) throws {
            try self.defaultValueList.forEach {
                try $0.validate(name: "\(name).defaultValueList[]")
            }
            try self.validate(self.defaultValueList, name: "defaultValueList", parent: name, max: 10)
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValueList = "defaultValueList"
        }
    }

    public struct SlotTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A regular expression used to validate the value of a slot.
        public let regexConfiguration: SlotTypeRegexConfiguration?

        @inlinable
        public init(regexConfiguration: SlotTypeRegexConfiguration? = nil) {
            self.regexConfiguration = regexConfiguration
        }

        public func validate(name: String) throws {
            try self.regexConfiguration?.validate(name: "\(name).regexConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case regexConfiguration = "regexConfiguration"
        }
    }

    public struct SlotTypeMetadata: AWSDecodableShape {
        /// The date that the slot type was created.
        public let createdDate: Date?
        /// A description of the slot type.
        public let description: String?
        /// The date that the slot type was updated. When you create a resource, the creation date and last updated date are the same.
        public let lastUpdatedDate: Date?
        /// The name of the slot type.
        public let name: String?
        /// The version of the slot type.
        public let version: String?

        @inlinable
        public init(createdDate: Date? = nil, description: String? = nil, lastUpdatedDate: Date? = nil, name: String? = nil, version: String? = nil) {
            self.createdDate = createdDate
            self.description = description
            self.lastUpdatedDate = lastUpdatedDate
            self.name = name
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "createdDate"
            case description = "description"
            case lastUpdatedDate = "lastUpdatedDate"
            case name = "name"
            case version = "version"
        }
    }

    public struct SlotTypeRegexConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A regular expression used to validate the value of a slot.  Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:   A-Z, a-z   0-9   Unicode characters ("\ u")   Represent Unicode characters with four digits, for example "\u0041" or "\u005A". The following regular expression operators are not supported:   Infinite repeaters: *, +, or {x,} with no upper bound.   Wild card (.)
        public let pattern: String

        @inlinable
        public init(pattern: String) {
            self.pattern = pattern
        }

        public func validate(name: String) throws {
            try self.validate(self.pattern, name: "pattern", parent: name, max: 100)
            try self.validate(self.pattern, name: "pattern", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case pattern = "pattern"
        }
    }

    public struct StartImportRequest: AWSEncodableShape {
        /// Specifies the action that the StartImport operation should take when there is an existing resource with the same name.   FAIL_ON_CONFLICT - The import operation is stopped on the first conflict between a resource in the import file and an existing resource. The name of the resource causing the conflict is in the failureReason field of the response to the GetImport operation. OVERWRITE_LATEST - The import operation proceeds even if there is a conflict with an existing resource. The $LASTEST version of the existing resource is overwritten with the data from the import file.
        public let mergeStrategy: MergeStrategy
        /// A zip archive in binary format. The archive should contain one file, a JSON file containing the resource to import. The resource should match the type specified in the resourceType field.
        public let payload: AWSBase64Data
        /// Specifies the type of resource to export. Each resource also exports any resources that it depends on.    A bot exports dependent intents.   An intent exports dependent slot types.
        public let resourceType: ResourceType
        /// A list of tags to add to the imported bot. You can only add tags when you import a bot, you can't add tags to an intent or slot type.
        public let tags: [Tag]?

        @inlinable
        public init(mergeStrategy: MergeStrategy, payload: AWSBase64Data, resourceType: ResourceType, tags: [Tag]? = nil) {
            self.mergeStrategy = mergeStrategy
            self.payload = payload
            self.resourceType = resourceType
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case mergeStrategy = "mergeStrategy"
            case payload = "payload"
            case resourceType = "resourceType"
            case tags = "tags"
        }
    }

    public struct StartImportResponse: AWSDecodableShape {
        /// A timestamp for the date and time that the import job was requested.
        public let createdDate: Date?
        /// The identifier for the specific import job.
        public let importId: String?
        /// The status of the import job. If the status is FAILED, you can get the reason for the failure using the GetImport operation.
        public let importStatus: ImportStatus?
        /// The action to take when there is a merge conflict.
        public let mergeStrategy: MergeStrategy?
        /// The name given to the import job.
        public let name: String?
        /// The type of resource to import.
        public let resourceType: ResourceType?
        /// A list of tags added to the imported bot.
        public let tags: [Tag]?

        @inlinable
        public init(createdDate: Date? = nil, importId: String? = nil, importStatus: ImportStatus? = nil, mergeStrategy: MergeStrategy? = nil, name: String? = nil, resourceType: ResourceType? = nil, tags: [Tag]? = nil) {
            self.createdDate = createdDate
            self.importId = importId
            self.importStatus = importStatus
            self.mergeStrategy = mergeStrategy
            self.name = name
            self.resourceType = resourceType
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "createdDate"
            case importId = "importId"
            case importStatus = "importStatus"
            case mergeStrategy = "mergeStrategy"
            case name = "name"
            case resourceType = "resourceType"
            case tags = "tags"
        }
    }

    public struct StartMigrationRequest: AWSEncodableShape {
        /// The strategy used to conduct the migration.    CREATE_NEW - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.    UPDATE_EXISTING - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.
        public let migrationStrategy: MigrationStrategy
        /// The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.
        public let v1BotName: String
        /// The version of the bot to migrate to Amazon Lex V2. You can migrate the $LATEST version as well as any numbered version.
        public let v1BotVersion: String
        /// The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.    If the Amazon Lex V2 bot doesn't exist, you must use the CREATE_NEW migration strategy.   If the Amazon Lex V2 bot exists, you must use the UPDATE_EXISTING migration strategy to change the contents of the Amazon Lex V2 bot.
        public let v2BotName: String
        /// The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.
        public let v2BotRole: String

        @inlinable
        public init(migrationStrategy: MigrationStrategy, v1BotName: String, v1BotVersion: String, v2BotName: String, v2BotRole: String) {
            self.migrationStrategy = migrationStrategy
            self.v1BotName = v1BotName
            self.v1BotVersion = v1BotVersion
            self.v2BotName = v2BotName
            self.v2BotRole = v2BotRole
        }

        public func validate(name: String) throws {
            try self.validate(self.v1BotName, name: "v1BotName", parent: name, max: 50)
            try self.validate(self.v1BotName, name: "v1BotName", parent: name, min: 2)
            try self.validate(self.v1BotName, name: "v1BotName", parent: name, pattern: "^([A-Za-z]_?)+$")
            try self.validate(self.v1BotVersion, name: "v1BotVersion", parent: name, max: 64)
            try self.validate(self.v1BotVersion, name: "v1BotVersion", parent: name, min: 1)
            try self.validate(self.v1BotVersion, name: "v1BotVersion", parent: name, pattern: "^\\$LATEST|[0-9]+$")
            try self.validate(self.v2BotName, name: "v2BotName", parent: name, max: 100)
            try self.validate(self.v2BotName, name: "v2BotName", parent: name, min: 1)
            try self.validate(self.v2BotName, name: "v2BotName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.v2BotRole, name: "v2BotRole", parent: name, max: 2048)
            try self.validate(self.v2BotRole, name: "v2BotRole", parent: name, min: 20)
            try self.validate(self.v2BotRole, name: "v2BotRole", parent: name, pattern: "^arn:[\\w\\-]+:iam::[\\d]{12}:role/.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case migrationStrategy = "migrationStrategy"
            case v1BotName = "v1BotName"
            case v1BotVersion = "v1BotVersion"
            case v2BotName = "v2BotName"
            case v2BotRole = "v2BotRole"
        }
    }

    public struct StartMigrationResponse: AWSDecodableShape {
        /// The unique identifier that Amazon Lex assigned to the migration.
        public let migrationId: String?
        /// The strategy used to conduct the migration.
        public let migrationStrategy: MigrationStrategy?
        /// The date and time that the migration started.
        public let migrationTimestamp: Date?
        /// The locale used for the Amazon Lex V1 bot.
        public let v1BotLocale: Locale?
        /// The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.
        public let v1BotName: String?
        /// The version of the bot to migrate to Amazon Lex V2.
        public let v1BotVersion: String?
        /// The unique identifier for the Amazon Lex V2 bot.
        public let v2BotId: String?
        /// The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.
        public let v2BotRole: String?

        @inlinable
        public init(migrationId: String? = nil, migrationStrategy: MigrationStrategy? = nil, migrationTimestamp: Date? = nil, v1BotLocale: Locale? = nil, v1BotName: String? = nil, v1BotVersion: String? = nil, v2BotId: String? = nil, v2BotRole: String? = nil) {
            self.migrationId = migrationId
            self.migrationStrategy = migrationStrategy
            self.migrationTimestamp = migrationTimestamp
            self.v1BotLocale = v1BotLocale
            self.v1BotName = v1BotName
            self.v1BotVersion = v1BotVersion
            self.v2BotId = v2BotId
            self.v2BotRole = v2BotRole
        }

        private enum CodingKeys: String, CodingKey {
            case migrationId = "migrationId"
            case migrationStrategy = "migrationStrategy"
            case migrationTimestamp = "migrationTimestamp"
            case v1BotLocale = "v1BotLocale"
            case v1BotName = "v1BotName"
            case v1BotVersion = "v1BotVersion"
            case v2BotId = "v2BotId"
            case v2BotRole = "v2BotRole"
        }
    }

    public struct Statement: AWSEncodableShape & AWSDecodableShape {
        /// A collection of message objects.
        public let messages: [Message]
        ///  At runtime, if the client is using the PostText API, Amazon Lex includes the response card in the response. It substitutes all of the session attributes and slot values for placeholders in the response card.
        public let responseCard: String?

        @inlinable
        public init(messages: [Message], responseCard: String? = nil) {
            self.messages = messages
            self.responseCard = responseCard
        }

        public func validate(name: String) throws {
            try self.messages.forEach {
                try $0.validate(name: "\(name).messages[]")
            }
            try self.validate(self.messages, name: "messages", parent: name, max: 15)
            try self.validate(self.messages, name: "messages", parent: name, min: 1)
            try self.validate(self.responseCard, name: "responseCard", parent: name, max: 50000)
            try self.validate(self.responseCard, name: "responseCard", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case messages = "messages"
            case responseCard = "responseCard"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key for the tag. Keys are not case-sensitive and must be unique.
        public let key: String
        /// The value associated with a key. The value may be an empty string but it can't be null.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case value = "value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag.
        public let resourceArn: String
        /// A list of tag keys to add to the resource. If a tag key already exists, the existing value is replaced with the new value.
        public let tags: [Tag]

        @inlinable
        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            try container.encode(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource to remove the tags from.
        public let resourceArn: String
        /// A list of tag keys to remove from the resource. If a tag key does not exist on the resource, it is ignored.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UtteranceData: AWSDecodableShape {
        /// The number of times that the utterance was processed.
        public let count: Int?
        /// The total number of individuals that used the utterance.
        public let distinctUsers: Int?
        /// The date that the utterance was first recorded.
        public let firstUtteredDate: Date?
        /// The date that the utterance was last recorded.
        public let lastUtteredDate: Date?
        /// The text that was entered by the user or the text representation of an audio clip.
        public let utteranceString: String?

        @inlinable
        public init(count: Int? = nil, distinctUsers: Int? = nil, firstUtteredDate: Date? = nil, lastUtteredDate: Date? = nil, utteranceString: String? = nil) {
            self.count = count
            self.distinctUsers = distinctUsers
            self.firstUtteredDate = firstUtteredDate
            self.lastUtteredDate = lastUtteredDate
            self.utteranceString = utteranceString
        }

        private enum CodingKeys: String, CodingKey {
            case count = "count"
            case distinctUsers = "distinctUsers"
            case firstUtteredDate = "firstUtteredDate"
            case lastUtteredDate = "lastUtteredDate"
            case utteranceString = "utteranceString"
        }
    }

    public struct UtteranceList: AWSDecodableShape {
        /// The version of the bot that processed the list.
        public let botVersion: String?
        /// One or more UtteranceData objects that contain information about the utterances that have been made to a bot. The maximum number of object is 100.
        public let utterances: [UtteranceData]?

        @inlinable
        public init(botVersion: String? = nil, utterances: [UtteranceData]? = nil) {
            self.botVersion = botVersion
            self.utterances = utterances
        }

        private enum CodingKeys: String, CodingKey {
            case botVersion = "botVersion"
            case utterances = "utterances"
        }
    }
}

// MARK: - Errors

/// Error enum for LexModelBuildingService
public struct LexModelBuildingServiceErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case badRequestException = "BadRequestException"
        case conflictException = "ConflictException"
        case internalFailureException = "InternalFailureException"
        case limitExceededException = "LimitExceededException"
        case notFoundException = "NotFoundException"
        case preconditionFailedException = "PreconditionFailedException"
        case resourceInUseException = "ResourceInUseException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize LexModelBuildingService
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Your IAM user or role does not have permission to call the Amazon Lex V2 APIs required to migrate your bot.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.
    public static var badRequestException: Self { .init(.badRequestException) }
    ///  There was a conflict processing the request. Try your request again.
    public static var conflictException: Self { .init(.conflictException) }
    /// An internal Amazon Lex error occurred. Try your request again.
    public static var internalFailureException: Self { .init(.internalFailureException) }
    /// The request exceeded a limit. Try your request again.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The resource specified in the request was not found. Check the resource and try again.
    public static var notFoundException: Self { .init(.notFoundException) }
    ///  The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.
    public static var preconditionFailedException: Self { .init(.preconditionFailedException) }
    /// The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete. The body of the exception contains a JSON object that describes the resource.  { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,   "resourceReference": {   "name": string, "version": string } }
    public static var resourceInUseException: Self { .init(.resourceInUseException) }
}

extension LexModelBuildingServiceErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "LimitExceededException": LexModelBuildingService.LimitExceededException.self,
        "ResourceInUseException": LexModelBuildingService.ResourceInUseException.self
    ]
}

extension LexModelBuildingServiceErrorType: Equatable {
    public static func == (lhs: LexModelBuildingServiceErrorType, rhs: LexModelBuildingServiceErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension LexModelBuildingServiceErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
